:root {
  --bg: #f3f5f4; --surface: #ffffff; --ink: #17252c; --muted: #58666c; --rule: #d6dfe0; --chip: #e5edef;
  --accent: #2d6a80; --accent-ink: #ffffff; --warm: #b4523a; --star: #b97d0f; --map-bg: #cfe0e6;
  --serif: "Newsreader", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Figtree", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 10px; --gutter: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0e161a; --surface: #152128; --ink: #e3eaeb; --muted: #97a8ae; --rule: #26363e; --chip: #1d2c33;
    --accent: #72b4cc; --accent-ink: #0e161a; --warm: #e28a70; --star: #e8b04a; --map-bg: #1a2a31;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--serif); font-size: 17px; line-height: 1.5; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent); }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; }
.label { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); margin: 0; }

/* header */
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--gutter);
  background: var(--surface); border-bottom: 1px solid var(--rule); }
.brand { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 22px; text-decoration: none; color: var(--ink); }
.top__right { display: flex; align-items: center; gap: 10px; }
.acct { font-family: var(--sans); font-size: 13px; font-weight: 600; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 5px 4px; }
.signin { background: var(--surface); border-bottom: 1px solid var(--rule); padding: 14px var(--gutter); font-family: var(--sans); font-size: 14px; }
.signin p { margin: 0 0 8px; }
.signin label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.signin__row { display: flex; gap: 8px; flex-wrap: wrap; }
.signin input { flex: 1 1 220px; border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px; background: var(--bg); font-size: 15px; }
.lang { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; }
.lang button { border: 0; background: none; padding: 5px 12px; font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* buttons, chips, search */
.btn { display: inline-block; font-family: var(--sans); font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--accent); text-decoration: none; cursor: pointer; background: none; color: var(--accent); }
.btn--solid { background: var(--accent); color: var(--accent-ink); }
.search { width: 100%; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--bg); font-family: var(--sans); font-size: 15px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.chip { flex: none; font-family: var(--sans); font-size: 13px; font-weight: 500; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--rule);
  background: var(--surface); cursor: pointer; white-space: nowrap; }
.chips { align-items: center; }
.chips__label { flex: none; width: 62px; font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chips--type { padding-top: 6px; }
.chips--type .chip { border-style: dashed; }
.chips--type .chip[aria-pressed="true"] { border-style: solid; }
.chip__n { opacity: .6; font-size: 11.5px; margin-left: 2px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.toggles { display: flex; gap: 16px; flex-wrap: wrap; font-family: var(--sans); font-size: 13px; color: var(--muted); padding-top: 8px; }
.toggles label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.num { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-family: var(--sans); font-size: 12px; font-weight: 700; }
.num--s { background: var(--warm); color: #fff; }
.empty { padding: 30px var(--gutter); color: var(--muted); font-family: var(--sans); font-size: 14px; }
.stars-inline { color: var(--star); letter-spacing: 1px; }
footer.foot { font-family: var(--sans); font-size: 12px; color: var(--muted); padding: 24px var(--gutter) 32px; max-width: 1040px; margin: 0 auto; }

/* rating box */
.rating { border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px 16px; }
.stars { display: flex; gap: 2px; margin: 6px 0 10px; }
.star { background: none; border: 0; font-size: 30px; line-height: 1; color: var(--rule); cursor: pointer; padding: 2px; }
.star.on { color: var(--star); }
.rating__fields { display: grid; gap: 10px; }
.rating label { font-family: var(--sans); font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.rating input, .rating textarea { border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px; background: var(--bg); font-family: var(--sans); font-size: 15px; }
.rating textarea { min-height: 70px; resize: vertical; }
.rating__actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.status { font-family: var(--sans); font-size: 12.5px; color: var(--muted); }

/* ---------- home ---------- */
.home { max-width: 1040px; margin: 0 auto; padding: 48px var(--gutter) 24px; }
.home__brand { font-style: italic; font-weight: 500; font-size: clamp(48px, 9vw, 92px); line-height: .95; letter-spacing: -.02em; margin: 6px 0 0; }
.home__lede { font-size: 19px; color: var(--muted); margin: 14px 0 40px; max-width: 34em; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 24px; }
.listcard { display: grid; grid-template-columns: 160px 1fr; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.listcard:hover { border-color: var(--accent); transform: translateY(-2px); }
.listcard img { width: 100%; height: 100%; min-height: 210px; object-fit: cover; display: block; }
.listcard__body { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.listcard h2 { font-size: 26px; line-height: 1.15; font-weight: 600; margin: 0; }
.listcard p { margin: 0; color: var(--muted); font-size: 16px; }
.listcard__go { margin-top: auto; font-family: var(--sans); font-weight: 600; font-size: 14px; color: var(--accent); }
.home__more { margin-top: 28px; font-family: var(--sans); font-size: 14px; color: var(--muted); }
.cover-credit { font-family: var(--sans); font-size: 12px; color: var(--muted); margin-top: 40px; }
@media (max-width: 540px) { .listcard { grid-template-columns: 1fr; } .listcard img { height: 170px; min-height: 0; } }

/* ---------- places (map page) ---------- */
body.mappage { height: 100%; display: flex; flex-direction: column; }
html:has(body.mappage) { height: 100%; }
.app { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(360px, 460px) 1fr; }
.panel { overflow-y: auto; background: var(--surface); border-right: 1px solid var(--rule); }
.mapwrap { position: relative; }
#map { position: absolute; inset: 0; background: var(--map-bg); }
.panel__head { padding: 18px var(--gutter) 14px; border-bottom: 1px solid var(--rule); }
.panel__head h1 { font-size: 27px; line-height: 1.1; margin: 0 0 6px; font-weight: 600; }
.sub { font-family: var(--sans); font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.group { padding: 18px var(--gutter) 6px; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { width: 100%; display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; text-align: left;
  padding: 10px var(--gutter); background: none; border: 0; border-top: 1px solid var(--rule); cursor: pointer; }
.row:hover { background: var(--chip); }
.row__name { display: block; font-size: 17px; font-weight: 600; line-height: 1.2; }
.row__sub { display: block; font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.row__side { font-family: var(--sans); font-size: 12.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row__side .stars-inline { display: block; }
.legend { position: absolute; left: 12px; bottom: 24px; z-index: 500; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px;
  padding: 6px 10px; font-family: var(--sans); font-size: 12px; display: flex; gap: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #2d6a80; margin-right: 5px; }
.legend i.s { background: #b4523a; }
.pinwrap { background: none; border: 0; }
.pin { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #2d6a80; color: #fff;
  font: 700 12px/1 var(--sans); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); transition: transform .12s; }
.pin--s { background: #b4523a; }
.pin--on { transform: scale(1.35); box-shadow: 0 0 0 3px #17252c, 0 2px 8px rgba(0,0,0,.5); }
.leaflet-marker-icon:hover .pin { transform: scale(1.2); }
.leaflet-container { font-family: var(--sans); }
.detail { padding: 16px var(--gutter) 40px; }
.back { font-family: var(--sans); font-size: 14px; font-weight: 600; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 4px 0; }
.detail figure { margin: 10px 0 0; }
.detail figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); display: block; background: var(--chip); }
.detail figcaption { font-family: var(--sans); font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.4; }
.nophoto { font-family: var(--sans); font-size: 13px; color: var(--muted); background: var(--chip); border-radius: var(--radius); padding: 14px 16px; margin-top: 10px; }
.detail__title { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; }
.detail h1 { font-size: 32px; line-height: 1.08; margin: 0; font-weight: 600; }
.tagline { font-style: italic; color: var(--muted); font-size: 18px; margin: 6px 0 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.fact { font-family: var(--sans); font-size: 12.5px; padding: 3px 9px; border-radius: 999px; background: var(--chip); }
.fact--s { background: none; border: 1px solid var(--warm); color: var(--warm); }
.links { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; }
.detail p { margin: 0 0 12px; }
.detail section { margin-top: 22px; }
.scores { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.scores b { color: var(--ink); font-size: 15px; }
.know { list-style: none; margin: 0; padding: 0; }
.know li { padding: 7px 0 7px 18px; border-bottom: 1px dotted var(--rule); position: relative; font-size: 16px; }
.know li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .6; }
.bestfor { background: var(--chip); border-radius: 8px; padding: 12px 14px; margin-top: 14px; }
.addr { font-family: var(--sans); font-size: 13px; color: var(--muted); }
@media (max-width: 899px) {
  body.mappage { height: auto; display: block; }
  html:has(body.mappage) { height: auto; }
  .app { display: flex; flex-direction: column; }
  .mapwrap { order: -1; height: 46svh; min-height: 280px; }
  .panel { overflow: visible; border-right: 0; }
}

/* ---------- recipes ---------- */
.rec { max-width: 1180px; margin: 0 auto; padding: 28px var(--gutter) 24px; }
.rec__head { max-width: 760px; }
.rec__head h1 { font-size: clamp(34px, 5vw, 50px); line-height: 1.05; margin: 0 0 8px; font-weight: 600; }
.rec__tools { display: grid; gap: 4px; margin: 18px 0 8px; max-width: 760px; }
.rec__chapter { margin: 30px 0 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 8px;
  border-top: 4px solid var(--chapter, var(--accent)); }
.card h3 { font-size: 21px; line-height: 1.15; margin: 0; font-weight: 600; }
.card p { margin: 0; font-size: 15.5px; }
.card__meta { font-family: var(--sans); font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.card__tag { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.card__by { color: var(--ink); }
.card__foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.card__stars { display: flex; }
.card__notes { display: flex; gap: 10px; align-items: baseline; }
.linkbtn { background: none; border: 0; padding: 0; font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; }
.card__rating, .card .rating { margin-top: 4px; }
.card .rating .star { font-size: 24px; }
.card__stars button { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--rule); cursor: pointer; padding: 1px; }
.card__stars button.on { color: var(--star); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
