/* Black and white. The only color on the page comes from the food photos. */
:root {
  --ink: #000000;
  --paper: #FFFFFF;
  --smoke: #F2F2F2;
  --line: #D9D9D9;
  --graphite: #595959;
  --rail: 420px;
  --r: 10px;
  color-scheme: light;
}
/* White on black: follows the system until the header button picks one (html[data-theme]) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink: #FFFFFF; --paper: #000000; --smoke: #161616; --line: #333333; --graphite: #A6A6A6; color-scheme: dark; }
}
:root[data-theme="dark"] { --ink: #FFFFFF; --paper: #000000; --smoke: #161616; --line: #333333; --graphite: #A6A6A6; color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--paper); color: var(--ink);
  font: 400 15px/1.5 "Schibsted Grotesk", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  display: flex; flex-direction: column; overflow: hidden;
}
/* Aligned digits for numbers only; in prose tabular commas and periods look spaced out */
.score, .metric b, .pbig, .pcell a, .rtab td.num, .hours td, #count { font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
img { display: block; }

/* Header */
.top { height: 56px; flex: none; display: flex; align-items: center; gap: 28px; padding: 0 20px; border-bottom: 1px solid var(--ink); background: var(--paper); position: relative; z-index: 1000; }
.wordmark { font-weight: 800; font-size: 21px; letter-spacing: -.03em; white-space: nowrap; }
.tabs { display: flex; gap: 2px; height: 100%; }
.tab { border: 0; background: none; padding: 0 12px; font-weight: 600; color: var(--graphite); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.top-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.lang { border: 1px solid var(--ink); background: var(--paper); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; height: 30px; }
.iconbtn { width: 30px; height: 30px; padding: 0; border: 1px solid var(--ink); border-radius: 50%; background: var(--paper); color: var(--ink); display: grid; place-items: center; }

.view { display: none; flex: 1; min-height: 0; }
.view.active { display: flex; }

/* Rail */
.rail { width: var(--rail); flex: none; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--paper); }
.filters { padding: 14px 16px 12px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.search { width: 100%; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); font-size: 15px; }
.frow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
select { padding: 6px 28px 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; max-width: 100%; min-width: 0; }
/* Cuisine picker: a pill like the selects, a popover of checkboxes */
.picker { position: relative; min-width: 0; }
.pick-btn { padding: 6px 28px 6px 12px; border: 1px solid var(--line); border-radius: 999px; background-color: var(--paper); max-width: 210px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.pick-btn.on { background-color: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 600; }
.pick-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 1300; width: min(388px, calc(100vw - 32px));
  background: var(--paper); border: 1px solid var(--ink); border-radius: 12px; padding: 12px 14px; }
.pick-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; font-size: 14px; }
.pick-head .linkish:disabled { color: var(--line); text-decoration: none; cursor: default; }
.pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; max-height: min(52vh, 360px); overflow-y: auto; }
.ck { display: flex; align-items: center; gap: 6px; padding: 6px 0; font-size: 14px; cursor: pointer; min-width: 0; }
.ck input { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; flex: none; }
.ck span { line-height: 1.25; overflow-wrap: anywhere; }
.ck small { margin-left: auto; padding-left: 4px; font-size: 12px; color: var(--graphite); }
.pick-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.pick-done { border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); padding: 7px 18px; font-weight: 700; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.more-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.more-panel select { width: 100%; }
.more-panel .wide { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
.more-panel .wide select { flex: 1; }
.lbl { font-size: 13px; color: var(--graphite); white-space: nowrap; }
.count { padding: 8px 16px; font-size: 13px; color: var(--graphite); }
.list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 10px 16px; cursor: pointer; border-top: 1px solid var(--smoke); }
.item:hover { background: var(--smoke); }
.item.sel { background: var(--smoke); box-shadow: inset 3px 0 0 var(--ink); }
.thumb { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; background: var(--smoke); }
.thumb.ph { display: grid; place-items: center; font-weight: 800; font-size: 26px; color: var(--graphite); }
.item .body { min-width: 0; }
.item .nm { font-weight: 700; font-size: 16px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .nm .zh { font-weight: 500; color: var(--graphite); margin-left: 6px; font-size: 14px; }
.item .meta { font-size: 13.5px; color: var(--graphite); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Highlights: strengths bold, cautions as solid tags */
.hl { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 13.5px; line-height: 1.4; white-space: nowrap; overflow: hidden; }
.hl > * { flex: none; }
.hl > :last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hl .good { font-weight: 700; }
.hl .plain { color: var(--graphite); }
.hl .warn { background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.hl i { font-style: normal; font-weight: 400; color: var(--graphite); margin-right: 5px; }
.meta .op { color: var(--ink); }
.flag { font-size: 13px; margin-top: 2px; font-weight: 700; }
.xtag { font-size: 12px; border: 1px solid var(--ink); border-radius: 4px; padding: 0 5px; font-weight: 600; white-space: nowrap; }
.score { min-width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; }
.score.s1 { background: var(--ink); color: var(--paper); }
.score.s2 { border: 2px solid var(--ink); }
.score.s3 { border: 1px solid var(--line); color: var(--graphite); }
.score.na { color: var(--line); font-weight: 600; }
.score.big { min-width: 64px; height: 64px; font-size: 24px; }
.more-btn { display: block; width: calc(100% - 32px); margin: 12px 16px 20px; padding: 10px; border: 1px solid var(--ink); border-radius: 999px; background: var(--paper); font-weight: 600; }
.empty { padding: 48px 16px; text-align: center; color: var(--graphite); }
.empty p { margin: 0 0 14px; font-size: 15px; }
.reset { border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); padding: 8px 18px; font-weight: 700; }

/* Map */
.mapwrap { flex: 1; position: relative; min-width: 0; }
#map { position: absolute; inset: 0; background: #EDEDED; }
.leaflet-tile-pane { filter: grayscale(1) contrast(1.05) brightness(1.04); }
.leaflet-container img.leaflet-tile { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #map { background: #111; }
  :root:not([data-theme="light"]) .leaflet-tile-pane { filter: grayscale(1) invert(1) brightness(.85) contrast(1.1); }
}
:root[data-theme="dark"] #map { background: #111; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: grayscale(1) invert(1) brightness(.85) contrast(1.1); }
.leaflet-tooltip.tip { font: 600 13px/1.3 "Schibsted Grotesk", "PingFang SC", "Microsoft YaHei", sans-serif; border-radius: 6px; border: 1px solid #000; box-shadow: none; }
.legend { background: var(--paper); border: 1px solid var(--ink); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; display: flex; gap: 12px; align-items: center; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }

/* Drawer */
.drawer { position: absolute; top: 14px; right: 14px; bottom: 14px; width: 480px; max-width: calc(100% - 28px); z-index: 900;
  background: var(--paper); border: 1px solid var(--ink); border-radius: 14px; overflow-y: auto; overscroll-behavior: contain; }
.close-wrap { position: sticky; top: 0; height: 0; z-index: 3; }
.close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--ink); background: var(--paper); font-size: 20px; line-height: 1; }
.hero { position: relative; margin: 0; height: 220px; background: var(--smoke); border-radius: 13px 13px 0 0; overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 20px 12px; color: #FFF;
  background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.75)); display: grid; gap: 1px; }
.hero figcaption small { font-size: 12.5px; opacity: .85; }
.hero figcaption b { font-size: 17px; line-height: 1.25; }
.hero figcaption span { font-size: 13px; opacity: .9; }
.dbody { padding: 18px 20px 26px; }
.dhead { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: start; }
.dhead h2 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.dhead .zh2 { font-size: 16px; font-weight: 600; color: var(--graphite); margin-top: 2px; }
.dline { font-size: 14px; color: var(--graphite); margin-top: 4px; }
.dline a { color: var(--ink); }
.dline .st { color: var(--ink); font-weight: 600; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag { font-size: 13px; padding: 2px 9px; border-radius: 999px; background: var(--smoke); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.act { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.act.primary { background: var(--ink); color: var(--paper); }
.act.off { border-style: dashed; color: var(--graphite); border-color: var(--line); }
.sec { margin-top: 22px; }
.sec h3 { margin: 0 0 10px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.dishrow { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.dish { flex: 0 0 140px; scroll-snap-align: start; }
.dish img, .dish .noimg { width: 140px; height: 140px; border-radius: 10px; object-fit: cover; background: var(--smoke); }
.dish .dn { font-size: 13.5px; font-weight: 600; margin-top: 6px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish .dz { font-size: 12.5px; color: var(--graphite); }
.dish .dm { font-size: 12.5px; color: var(--graphite); margin-top: 2px; }
.dishlist { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.dishlist li { display: flex; justify-content: space-between; gap: 12px; }
/* Verdict under the name: warnings inverted, the one-line verdict large */
.verdict { margin-top: 14px; display: grid; gap: 6px; }
.verdict p { margin: 0; font-size: 15px; line-height: 1.5; }
.verdict .lead { font-size: 19px; line-height: 1.4; font-weight: 800; letter-spacing: -.01em; }
.verdict .warn { background: var(--ink); color: var(--paper); font-size: 14.5px; font-weight: 700; padding: 8px 12px; border-radius: 8px; }
.verdict b { font-weight: 800; }
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 18px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric { text-align: center; }
.metric b { display: block; font-size: 18px; font-weight: 800; }
.metric span { font-size: 12.5px; color: var(--graphite); }
.metric i { display: block; height: 3px; background: var(--smoke); margin: 6px 6px 0; border-radius: 2px; overflow: hidden; }
.metric i u { display: block; height: 100%; background: var(--ink); text-decoration: none; }
.metric.hi b { font-size: 22px; }
.metric.hi i { height: 5px; }
.metric.lo b, .metric.lo span { color: var(--graphite); font-weight: 600; }
.metric.lo i u { background: var(--graphite); }
details.fold { border-bottom: 1px solid var(--line); }
details.fold summary { list-style: none; cursor: pointer; padding: 13px 0; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: "+"; font-weight: 400; font-size: 20px; line-height: 1; }
details.fold[open] summary::after { content: "−"; }
details.fold summary small { font-weight: 400; color: var(--graphite); margin-left: 8px; font-size: 13px; }
.fold-body { padding-bottom: 14px; font-size: 14px; }
.fold-body ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.rtab, .hours { width: 100%; border-collapse: collapse; font-size: 14px; }
.rtab td, .hours td { padding: 6px 2px; border-bottom: 1px solid var(--smoke); }
.rtab td.num { text-align: right; white-space: nowrap; }
.hours tr.today td { font-weight: 700; }
.quote { margin: 0 0 12px; padding-left: 12px; border-left: 2px solid var(--ink); font-size: 14px; }
.quote .qm { font-size: 12.5px; color: var(--graphite); margin-top: 3px; }
.insp { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; }
.insp .bad { font-weight: 700; }
.src { font-size: 12.5px; color: var(--graphite); }
.linkish { border: 0; background: none; padding: 0; text-decoration: underline; font-size: inherit; }
.howbox { font-size: 13.5px; line-height: 1.55; display: grid; gap: 8px; }

.switcher { display: none; }

/* Delivery apps */
.plat-page { flex: 1; overflow-y: auto; }
.plat-inner { max-width: 1180px; margin: 0 auto; padding: 22px 20px 40px; }
.plat-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.pcard { text-align: left; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--paper); padding: 14px 16px; }
.pcard[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.pcard .pn { font-weight: 800; font-size: 16px; }
.pcard .pbig { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: 6px; }
.pcard .psub { font-size: 13px; opacity: .75; }
.plat-price:not(:empty) { margin-top: 14px; padding: 14px 18px; background: var(--smoke); border-radius: 12px; }
.plat-price b { font-size: 15.5px; }
.plat-price p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; max-width: 92ch; }
html[lang|="zh"] .plat-price p { max-width: none; }
.plat-note { font-size: 13px; color: var(--graphite); margin: 10px 0 18px; }
.plat-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.plat-tools .search { max-width: 360px; }
.prow { display: grid; grid-template-columns: 56px minmax(180px, 1.6fr) 54px repeat(5, minmax(84px, 1fr)); gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--smoke); }
.prow.head { border-top: 0; font-size: 12.5px; color: var(--graphite); font-weight: 600; padding: 6px 0; position: sticky; top: 0; background: var(--paper); z-index: 1; }
.prow.head button { border: 0; background: none; padding: 0; color: inherit; font-weight: 600; text-align: left; }
.prow .thumb { width: 56px; height: 56px; }
.prow .pname { min-width: 0; }
.prow .pname b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.prow .pname span { font-size: 13px; color: var(--graphite); }
.pcells { display: contents; }
.pcell { font-size: 14px; }
.pcell a { text-decoration: none; display: inline-block; padding: 4px 9px; border: 1.5px solid var(--ink); border-radius: 999px; font-weight: 700; white-space: nowrap; }
.pcell small { display: block; font-size: 11.5px; color: var(--graphite); margin-top: 2px; }
.pcell .no { color: var(--line); }
.pcell .paused { color: var(--graphite); font-size: 12.5px; }
.pcell .pa { display: none; }
.pcell small.cheap { color: var(--ink); font-weight: 700; }
.xpanel { margin-top: 30px; }

/* All places: the whole width for photo cards; the filter bar stays on top */
#view-grid { position: relative; }
.gwrap { flex: 1; min-width: 0; overflow-y: auto; }
.ghead { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.ghead .filters { max-width: 1280px; margin: 0 auto; padding: 14px 24px 12px; border-bottom: 0; grid-template-columns: minmax(240px, 420px) minmax(0, 1fr); column-gap: 14px; align-items: center; }
.ghead .more-panel { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gcount { max-width: 1280px; margin: 0 auto; padding: 14px 24px 8px; font-size: 13px; color: var(--graphite); }
.grid { list-style: none; max-width: 1280px; margin: 0 auto; padding: 4px 24px 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 28px 22px; }
.grid .empty { grid-column: 1 / -1; }
.card { display: block; color: inherit; text-decoration: none; border-radius: 12px; scroll-margin: 96px 0 24px; }
.card:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.cimg { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--smoke); }
.cimg img { width: 100%; height: 100%; object-fit: cover; }
.cimg .ph { display: grid; place-items: center; width: 100%; height: 100%; font-size: 46px; font-weight: 800; color: var(--graphite); }
.cimg .score { position: absolute; top: 10px; right: 10px; background: var(--paper); box-shadow: 0 0 0 2px var(--paper); }
.cimg .score.s1 { background: var(--ink); }
.cimg .score.na { display: none; }
.cbody { margin-top: 10px; min-width: 0; }
.card .nm { font-size: 17px; font-weight: 800; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .nm .zh { font-weight: 500; font-size: 14px; color: var(--graphite); margin-left: 6px; }
.card:hover .nm { text-decoration: underline; text-underline-offset: 3px; }
.card .meta { font-size: 13.5px; color: var(--graphite); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmore { width: min(360px, calc(100% - 48px)); margin: 0 auto 40px; }
.gfoot { width: min(1232px, calc(100% - 48px)); margin: 0 auto; padding: 20px 0 36px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.6; color: var(--graphite); }
/* Shapes standing in for cards and a place page while they load */
.sk .cimg, .sk-box { background: var(--smoke); }
.sk i, .sk-line { display: block; width: 70%; height: 12px; margin-top: 10px; border-radius: 6px; background: var(--smoke); }
.sk i + i, .sk-line.short { width: 42%; }

/* Place page: the place on the left; map, address, ordering and scores on the right, staying in view */
.gpage { position: absolute; inset: 0; z-index: 30; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); }
.gp-bar { position: sticky; top: 0; z-index: 2; background: var(--paper); border-bottom: 1px solid var(--line); }
.gp-bar .back { display: block; width: 100%; max-width: 1180px; margin: 0 auto; padding: 12px 24px; border: 0; background: none; text-align: left; font-weight: 700; font-size: 15px; }
.gp { max-width: 1180px; margin: 0 auto; padding: 22px 24px 64px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 40px; align-items: start; }
.gp-main { min-width: 0; }
.gp-side { position: sticky; top: 70px; display: grid; gap: 14px; min-width: 0; }
.gp-hero .hero { height: 380px; border-radius: 14px; }
.gp-head { margin-top: 20px; }
.gp-hero:empty + .gp-head { margin-top: 0; }
.gp-head .dhead h2 { font-size: 34px; }
.gp-head .score.big { min-width: 72px; height: 72px; font-size: 28px; }
.gp-map { height: 260px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--smoke); isolation: isolate; }
.gp-side .dline { margin-top: 0; }
.gp-side .actions, .gp-side .metrics { margin-top: 0; }
.gp-body .sec:first-child { margin-top: 26px; }
.gp-body .dish { flex-basis: 170px; }
.gp-body .dish img, .gp-body .dish .noimg { width: 170px; height: 170px; }
.tab .ts { display: none; }

@media (max-width: 900px) {
  /* One column: photo, name and verdict, then map and ordering, then dishes and details */
  .gp { display: flex; flex-direction: column; padding: 0 0 48px; }
  .gp-main { display: contents; }
  .gp-hero { order: 1; }
  .gp-head { order: 2; }
  .gp-side { order: 3; position: static; padding: 18px 16px 0; }
  .gp-body { order: 4; }
  .gp-hero .hero { height: 240px; border-radius: 0; }
  .gp-head, .gp-body { padding: 0 16px; }
  .gp-head { margin-top: 16px; }
  .gp-head .dhead h2 { font-size: 26px; }
  .gp-map { height: 200px; }
}
@media (max-width: 520px) {
  .tab .tl { display: none; }
  .tab .ts { display: inline; }
}
@media (max-width: 760px) {
  :root { --rail: 100%; }
  .ghead .filters { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .ghead .more-panel { grid-template-columns: 1fr 1fr; }
  .gcount { padding: 10px 12px 4px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; padding: 4px 12px 24px; }
  .card .nm { font-size: 15px; }
  .card .nm .zh { display: none; }
  .card .hl > :nth-child(n+3) { display: none; }
  .card .hl > :nth-child(2) { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .gfoot { width: calc(100% - 24px); padding: 18px 0 32px; }
  .cimg .score { min-width: 36px; height: 36px; font-size: 14px; top: 8px; right: 8px; }
  .gp-bar .back { padding: 12px 16px; }
  .top { gap: 14px; padding: 0 12px; }
  .wordmark { font-size: 18px; }
  .tab { padding: 0 8px; }
  .rail { border-right: 0; }
  .mapwrap { position: absolute; inset: 56px 0 0 0; z-index: 800; visibility: hidden; }
  body.show-map .mapwrap { visibility: visible; }
  .drawer { position: fixed; inset: 56px 0 0 0; width: auto; max-width: none; border-radius: 0; border: 0; z-index: 1200; visibility: visible; }
  .hero { border-radius: 0; height: 200px; }
  .switcher { display: block; position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1100; border: 0; border-radius: 999px;
    padding: 11px 22px; background: var(--ink); color: var(--paper); font-weight: 700; }
  body.drawer-open .switcher { display: none; }
  .legend { display: none; }
  .plat-cards { grid-template-columns: repeat(2, 1fr); }
  .prow { grid-template-columns: 48px 1fr 44px; }
  .prow .pcells { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
  .pcell.nil { display: none; }
  .prow.head { display: none; }
  .pcell .pa { display: inline; }
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dline .dist { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Motion, only in answer to something the visitor did; none when the system asks for less motion */
@media (prefers-reduced-motion: no-preference) {
  img.thumb, .hero img, .dish img { opacity: 0; transition: opacity .35s ease; }
  .cimg img { opacity: 0; transition: opacity .35s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
  img.thumb.ld, .hero img.ld, .dish img.ld, .cimg img.ld { opacity: 1; }
  .card:focus-visible .cimg img { transform: scale(1.045); }
  @media (hover: hover) { .card:hover .cimg img { transform: scale(1.045); } }
  /* Old results dim while new ones load; new cards rise in, a beat apart */
  .grid, .list { transition: opacity .15s ease; }
  .grid.busy, .list.busy { opacity: .45; }
  .grid > li.in { animation: rise .34s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--k) * 22ms); }
  .sk .cimg, .sk i, .sk-box, .sk-line { animation: pulse 1.2s ease-in-out infinite; }
  /* Panels arrive instead of popping */
  .drawer:not([hidden]) { animation: slidein .24s cubic-bezier(.2, .7, .2, 1) both; }
  .gpage:not([hidden]) .gp { animation: rise .28s cubic-bezier(.2, .7, .2, 1) both; }
  .pick-pop:not([hidden]) { animation: pop .16s ease-out both; transform-origin: 24px 0; }
  .more-panel:not([hidden]) { animation: rise .2s ease both; }
  /* Buttons give a little under the finger */
  .chip, .pick-btn, .act, .more-btn, .pcard, .lang, .iconbtn, .pick-done, .reset { transition: transform .12s ease, background-color .15s ease, color .15s ease; }
  .chip:active, .pick-btn:active, .act:active, .more-btn:active, .pcard:active, .lang:active, .iconbtn:active, .pick-done:active, .reset:active { transform: scale(.96); }
  /* Black/white switch: colours cross-fade, the icon turns */
  .iconbtn svg { transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
  .theming, .theming *, .theming *::before, .theming *::after { transition: background-color .35s ease, color .35s ease, border-color .35s ease, fill .35s ease, filter .35s ease !important; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes slidein { from { opacity: 0; transform: translateX(16px); } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes pulse { 50% { opacity: .5; } }
:root[data-theme="dark"] .iconbtn svg { transform: rotate(180deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .iconbtn svg { transform: rotate(180deg); } }
