/* Savvy Picks guide (/eat/guides/<slug>/), flagship round 8 (2026-11-25): the top three as photo tiles in the header,
   photo-led pick cards with an open-now line, and the town / Open now bar (src/js/eat-guide.js). eat.css keeps the
   card, map and Quick answers basics; this file loads after it. Every rule names a guide class (eg-, egp-, egt-). */

/* header: the words, then the top three; side by side on wide screens */
.ph.eg-head { padding-bottom: var(--sp-24); }
.eg-head .crumbs { margin-bottom: var(--sp-4); }
.eg-head h1 { margin-top: var(--sp-8); }
.eg-head .lede { margin-bottom: var(--sp-12); }

/* the top three */
.egp { list-style: none; margin: var(--sp-24) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-8); counter-reset: none; }
.egp-t a { position: relative; container-type: inline-size; display: grid; align-content: start; gap: var(--sp-4); height: 100%; color: inherit; text-decoration: none; border-radius: var(--radius-sm); }
.egp-ph { position: relative; display: block; overflow: hidden; aspect-ratio: 1; border-radius: var(--radius-sm); background: #efe6d6; }
.egp-ph img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.egp-t a:hover .egp-ph img { transform: scale(1.04); }
.egp-t a:focus-visible { outline: 2.5px solid var(--tile); outline-offset: 3px; }
.egp-n { position: absolute; left: var(--sp-8); top: var(--sp-8); z-index: 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--tile); color: #fffaf2; font: 700 .82rem/1 var(--sans); box-shadow: 0 2px 8px rgba(24, 34, 46, .3); }
.egp-st { position: absolute; left: var(--sp-4); top: calc(100cqw - 1.9rem); z-index: 2; display: inline-flex; align-items: center; gap: var(--sp-4); padding: .3em .6em; border-radius: 999px; background: #fffaf2; color: #1f6b46; font: 600 .68rem/1 var(--sans); box-shadow: 0 2px 8px rgba(24, 34, 46, .2); }
.egp-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #2f8a5b; }
.egp-tx { display: grid; gap: 2px; }
.egp-name { font: 600 .82rem/1.25 var(--sans); color: var(--ink); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.egp-l { display: none; }
/* a top pick with no photo (or whose photo failed and was removed): the number and name on a warm square, not an
   empty frame; the square keeps its column's width (a stretched height must not widen it) */
.egp-t:not(:has(.egp-ph)) a { width: 100%; height: auto; aspect-ratio: 1; align-content: end; padding: var(--sp-8); background: linear-gradient(160deg, #f6e3c4, #efcf9f); }
.egp-t:not(:has(.egp-ph)) .egp-name { font: 400 1rem/1.1 var(--serif); color: var(--ink); -webkit-line-clamp: 3; line-clamp: 3; }
.egp-t:not(:has(.egp-ph)) .egp-st { left: auto; right: var(--sp-4); top: var(--sp-4); }

@media (min-width: 1000px) {
  .eg-head.has-top .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: var(--sp-48); align-items: center; }
  .eg-head.has-top h1 { max-width: 13ch; }
  .egp { margin: 0; grid-template-columns: 1.45fr 1fr; grid-template-rows: 1fr 1fr; gap: var(--sp-12); height: 380px; }
  .egp-t.is-first { grid-row: 1 / 3; }
  .egp-t a { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-2); }
  .egp-ph { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
  .egp-ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18, 26, 36, .78), rgba(18, 26, 36, .15) 45%, transparent 70%); }
  .egp-tx { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: var(--sp-16); gap: var(--sp-4); }
  .egp-name { font: 400 1.3rem/1.1 var(--serif); color: #fffaf2; }
  .egp-t.is-first .egp-name { font-size: 1.75rem; }
  .egp-l { display: block; font: 500 .82rem/1.35 var(--sans); color: rgba(255, 250, 242, .88); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  .egp-t:not(.is-first) .egp-l { display: none; }
  .egp-n { left: var(--sp-12); top: var(--sp-12); width: 32px; height: 32px; font-size: .9rem; }
  .egp-st { left: auto; right: var(--sp-12); top: var(--sp-12); font-size: .75rem; }
  .egp-t:not(:has(.egp-ph)) a { aspect-ratio: auto; height: 100%; padding: var(--sp-16); display: grid; }
  .egp-t:not(:has(.egp-ph)) .egp-tx { position: static; padding: 0; }
  .egp-t:not(:has(.egp-ph)) .egp-name { color: var(--ink); }
  .egp-t:not(:has(.egp-ph)) .egp-l { color: var(--ink-2); }
  .egp-t:not(:has(.egp-ph)) .egp-st { right: var(--sp-12); top: var(--sp-12); }
}

/* the bar: towns, Open now, and how many show */
.egt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-8) var(--sp-12); margin-top: var(--sp-24); padding: var(--sp-12) 0; border-block: 1px solid var(--line); }
.no-js .egt-bar { display: none; }
.egt-row { display: flex; gap: var(--sp-8); overflow-x: auto; scrollbar-width: none; max-width: 100%; padding: 2px; }
.egt-row::-webkit-scrollbar { display: none; }
.egt-chip { flex: none; display: inline-flex; align-items: center; gap: var(--sp-4); padding: .55em .95em; border: 1.5px solid var(--line); border-radius: 999px; background: #fffaf2; color: var(--ink); font: 600 .82rem/1 var(--sans); cursor: pointer; white-space: nowrap; }
.egt-chip:hover { border-color: var(--tile); }
.egt-chip:focus-visible { outline: 2.5px solid var(--tile); outline-offset: 2px; }
.egt-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fffaf2; }
.egt-cn { min-width: 1.2em; font-weight: 500; opacity: .7; font-variant-numeric: tabular-nums; }
.egt-open .eg-dot { margin-right: 2px; }
.egt-open[aria-pressed="true"] .eg-dot { box-shadow: 0 0 0 3px rgba(255, 250, 242, .25); }
.egt-count { margin: 0 0 0 auto; font: 500 .82rem/1.3 var(--sans); color: var(--ink-3); }
.egt-note { margin: var(--sp-12) 0 0; padding: var(--sp-8) var(--sp-12); border-radius: var(--radius-sm); background: #fbeed6; font: 500 .9rem/1.45 var(--sans); color: var(--ink-2); }
.egt-empty { margin: var(--sp-16) 0 0; font: 500 1rem/1.5 var(--sans); color: var(--ink-2); }
.egt-reset { padding: .45em .9em; border: 1.5px solid var(--line); border-radius: 999px; background: #fffaf2; color: var(--ink); font: 600 .82rem/1 var(--sans); cursor: pointer; }
.egt-reset:hover { border-color: var(--tile); }
.egt-fine { margin: var(--sp-16) 0 0; max-width: 46em; }

/* the open-now line on a card, and on each address */
.eg-dot { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); opacity: .55; }
.eg-st { display: flex; align-items: center; gap: var(--sp-8); margin: var(--sp-8) 0 0; font: 600 .82rem/1.35 var(--sans); color: var(--ink-3); }
.eg-st.is-open { color: #1f6b46; }
.eg-st.is-open .eg-dot, .egt-open .eg-dot { background: #2f8a5b; opacity: 1; box-shadow: 0 0 0 3px rgba(47, 138, 91, .18); }
.eg-st.is-soon { color: #8a5200; }
.eg-st.is-soon .eg-dot { background: var(--sun); opacity: 1; box-shadow: 0 0 0 3px rgba(239, 161, 58, .25); }
.eg-pick .eg-body > .eg-st { color: var(--ink-3); }
.eg-pick .eg-body > .eg-st.is-open { color: #1f6b46; }
.eg-pick .eg-body > .eg-st.is-soon { color: #8a5200; }
.eg-locs .eg-ls { color: var(--ink-3); font-weight: 500; }
.eg-locs li.is-open .eg-ls { color: #1f6b46; }

/* photo-led cards: the photo runs to the card's edges with the rank on it */
.eg-pick.has-ph:has(.eg-hero-ph) { padding-top: 0; overflow: hidden; }
.eg-pick.has-ph:has(.eg-hero-ph) > .eg-n { display: none; }
.eg-pick.has-ph:has(.eg-hero-ph) .eg-body { grid-column: 1 / -1; }
.eg-pick .eg-hero-ph { position: relative; margin: 0 calc(-1 * var(--sp-24)) var(--sp-16); }
.eg-pick .eg-hero-ph img { aspect-ratio: 16 / 9; border-radius: 0; }
.eg-pick .eg-hero-ph figcaption { position: absolute; right: var(--sp-8); bottom: var(--sp-8); margin: 0; padding: .3em .6em; border-radius: 999px; background: rgba(18, 26, 36, .6); color: #fffaf2; font-size: .68rem; line-height: 1.2; }
.eg-pick .eg-hero-ph figcaption a { color: inherit; }
.eg-ph-n { position: absolute; left: var(--sp-16); top: var(--sp-16); z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tile); color: #fffaf2; font: 700 1.12rem/1 var(--sans); box-shadow: 0 2px 10px rgba(24, 34, 46, .35); }
.eg-pick.is-on .eg-ph-n { background: var(--ink); }
.eg-pick.has-ph:has(.eg-hero-ph) .eg-name { margin-top: 0; }
@media (max-width: 639px) {
  .eg-pick .eg-hero-ph { margin: 0 calc(-1 * var(--sp-16)) var(--sp-12); }
  .eg-pick.has-ph:has(.eg-hero-ph) .eg-name { grid-column: 1 / -1; grid-row: auto; }
  .eg-pick.has-ph:has(.eg-hero-ph) .eg-hero-ph { grid-row: auto; }
  .eg-ph-n { left: var(--sp-12); top: var(--sp-12); width: 34px; height: 34px; font-size: 1rem; }
  .egt-count { flex-basis: 100%; margin: 0; }
  .eg-sec .eg-map { height: min(40vh, 280px); }
}
@media (prefers-reduced-motion: reduce) {
  .egp-ph img { transition: none; }
  .egp-t a:hover .egp-ph img { transform: none; }
}
