.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px 24px;
}
@media (min-width: 620px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.cards .card {
  min-width: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  color: var(--ink);
}
.cards .card:focus-visible,
.sheet :focus-visible {
  outline: 3px solid #e93b0d;
  outline-offset: 3px;
}
.card-dish-photo,
.cards .card-photo {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.82;
  height: auto;
  border: 0;
  background: #ebe6dc;
  border-radius: 5px;
  overflow: hidden;
}
.card-dish-photo img {
  z-index: 1;
  object-position: center;
}
.cards .card-body { padding: 15px 0 0; min-width: 0; }
.card-topline,
.cards .card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px 10px;
}
.card-topline {
  color: #62574c;
  font-size: 11.5px;
  line-height: 1.4;
  margin: 0 0 6px;
}
.card-type { font-weight: 700; color: #994027; }
.card-topline .rating { color: #62574c; }
.card-topline .rating b { color: #3e372e; }
.cards .card-name {
  margin: 0 0 5px;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.12;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.cards .card-name-zh {
  font-size: 12px;
  margin: 0;
  color: #645e54;
}
.cards .card-dish {
  margin: 11px 0 0;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.card-dish-label {
  margin-right: .32em;
  color: #8b3926;
  font-size: 11px;
  font-weight: 650;
}
.cards .card-meta {
  margin-top: auto;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  justify-content: flex-start;
  row-gap: 5px;
}
.cards .price { font-weight: 700; font-size: 13px; line-height: 1.4; }
.card-location {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #5f564d;
  overflow-wrap: anywhere;
}
.card-location svg {
  flex: none;
  align-self: flex-start;
  width: 14px;
  height: 14px;
  margin-top: .08em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
@media (hover:hover) {
  .cards .card:hover .card-name { color: #c8340a; text-decoration: underline; }
}
@media (max-width: 619px) {
  .cards { gap: 0; }
  .cards .card {
    display: grid;
    grid-template-columns: minmax(86px, 30%) minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
  }
  .card-dish-photo,
  .cards .card-photo { aspect-ratio: .94; }
  .cards .card-body { padding: 0; }
  .cards .card-body:only-child { grid-column: 1 / -1; }
  .card-topline { display: none; }
  .cards .card-name { font-size: 21px; line-height: 1.12; }
  .cards .card-name-zh { font-size: 11.5px; line-height: 1.35; }
  .cards .card-dish { font-size: 13px; margin: 6px 0 0; }
  .cards .card-meta { padding: 6px 0 0; border: 0; }
  .cards .price { font-size: 12.5px; }
}

.sheet-backdrop { z-index: 90; background: rgba(32, 28, 23, .54); }
.sheet {
  z-index: 91;
  background: #fffdf8;
  border: 0;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  height: 94vh;
  height: 94dvh;
  max-height: 94vh;
  max-height: 94dvh;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}
.sheet-close {
  position: static;
  flex: none;
  display: grid;
  place-items: center;
  margin: 0 0 0 auto;
  width: 44px;
  height: 44px;
  background: #fffdf8;
  border-radius: 50%;
  color: var(--ink);
  border-color: #c7bcae;
  font: 26px/1 var(--font);
}
.sheet .sh-head { padding: 0 0 20px; margin: 0 0 21px; }
.sh-kicker {
  display: block;
  font-size: 12px;
  letter-spacing: .025em;
  line-height: 1.45;
  color: #c8340a;
}
.sh-kicker::before { display: none; }
.sh-title {
  font-size: clamp(30px, 4vw, 43px);
  letter-spacing: -.03em;
  line-height: 1.06;
  text-wrap: pretty;
}
.sh-intro { color: var(--ink); font-size: 15px; line-height: 1.5; margin: 12px 0; }
.sheet .card-tags { margin: 10px 0 0; }
.sheet .tag { text-transform: none; font-size: 11px; letter-spacing: 0; }
.sh-section { margin-bottom: 28px; }
.sh-h {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 25px;
  letter-spacing: -.02em;
  line-height: 1.15;
  text-transform: none;
  margin-bottom: 14px;
}
.facts { gap: 0 20px; }
.facts .fact {
  background: transparent;
  padding: 9px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.fact-k { font-size: 12px; color: #655e53; }
.fact-v { font-size: 15px; }
.sh-section .dish {
  gap: 14px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  margin: 0;
  padding: 12px 0;
  background: transparent;
}
.dish-thumb { width: 72px; height: 72px; }
.dish-name { font-size: 18px; line-height: 1.2; }
.dish-note, .review-en, .sh-inline, .bullets li { font-size: 14px; line-height: 1.55; }
.sheet .sh-hero-photo { height: clamp(140px, 32vw, 240px); margin-bottom: 0; border-radius: 5px 5px 0 0; }
.status .check-date { display: block; margin-top: 4px; }

@media (min-width: 680px) {
  .sheet {
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    width: min(650px, 87vw);
    max-height: 100%;
    transform: none;
    border-radius: 0;
    height: 100%;
    box-shadow: -10px 0 45px #251b1514;
  }
}

/* Keep the two on-the-go tasks reachable while the restaurant details scroll. */
.sheet[hidden], .sheet [hidden] { display: none; }
.sheet-toolbar, .sheet-actions {
  flex: none;
  padding-inline: clamp(16px, 4.5vw, 32px);
  background: #fffdf8;
}
.sheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding-block: 4px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.sheet-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 4px 6px 4px 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: 600 14px/1.3 var(--font);
}
.sheet-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px clamp(16px, 4.5vw, 32px) 24px;
}
.sheet-actions {
  display: flex;
  gap: 9px;
  align-items: stretch;
  border-top: 1px solid #d9d2c5;
  padding-top: 10px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.task-button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  min-width: 0;
  gap: 7px;
  min-height: 49px;
  border-radius: 7px;
  padding: 8px;
  border: 1px solid #ad9d88;
  background: transparent;
  color: var(--ink);
  font: 650 14px/1.25 var(--font);
  text-decoration: none;
}
.task-button.primary { color: #fffdf7; background: #c8340a; border-color: #c8340a; }
.task-button:disabled { opacity: .5; }
.task-button svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.task-title { font: 550 clamp(29px, 5.8vw, 43px)/1.1 var(--serif); letter-spacing: -.045em; margin: 6px 0 12px; }
.task-place, .directions-name { margin: 0; font-size: 15px; color: var(--muted); }
.order-slip, .direction-address { padding: clamp(16px, 4vw, 27px); border-radius: 8px; margin: 18px 0 12px; }
.order-slip { background: #332b23; color: #fffdf5; }
.order-zh { font: 600 clamp(29px, 6.7vw, 40px)/1.55 "PingFang SC","Microsoft YaHei",sans-serif; letter-spacing: .015em; }
.order-translation { color: #f7ece1; margin: 20px 0 0; padding-top: 14px; border-top: 1px solid #756a5c; font-size: 16px; line-height: 1.55; }
.task-hint { margin: 12px 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.direction-address { background: #f3ede0; }
.direction-address h3 { margin: 0 0 5px; font-size: clamp(22px, 5vw, 29px); line-height: 1.35; }
.direction-zh { margin: 16px 0 7px; font-size: clamp(20px, 4.5vw, 25px); line-height: 1.45; }
.direction-en { margin: 0; color: var(--muted); font-size: 15px; }
.storefront { margin: 18px 0; }
.storefront figcaption { color: var(--muted); margin: 0 0 8px; font-size: 14px; }
.storefront .sh-hero-photo { height: auto; aspect-ratio: 2.05; border-radius: 7px; }
@media (max-height:480px) {
  .sheet { height: 100vh; height: 100dvh; max-height: 100dvh; }
  .sheet-toolbar { min-height: 44px; padding-block: 0; }
  .sheet-actions { padding-top: 5px; padding-bottom: max(5px, env(safe-area-inset-bottom)); }
}

/* Storefront lightbox: tap the photo to view it full-size. */
.storefront { position: relative; }
.storefront .sh-hero-photo { cursor: zoom-in; }
.storefront-zoom {
  position: absolute; right: 10px; bottom: 10px;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 0; cursor: zoom-in;
  background: rgba(20,18,12,.55); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .18s ease, transform .18s ease;
}
.storefront-zoom:hover { background: rgba(20,18,12,.78); transform: scale(1.04); }
.storefront-zoom svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.photo-lightbox {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(10,8,6,.975);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 20px;
  animation: lbIn .18s ease both;
}
.photo-lightbox[hidden] { display: none; }
@keyframes lbIn { from { opacity: 0 } to { opacity: 1 } }
.photo-lightbox .lightbox-img {
  max-width: 100%; max-height: calc(100% - 70px);
  width: auto; height: auto;
  object-fit: contain; border-radius: 6px;
  box-shadow: 0 18px 60px rgba(0,0,0,.5);
}
.photo-lightbox .lightbox-caption {
  margin: 0; color: #f2efe8; font-size: 13px; text-align: center; line-height: 1.5;
}
.photo-lightbox .lightbox-close {
  position: absolute; top: 14px; right: 16px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.1);
  color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.photo-lightbox .lightbox-close:hover { background: rgba(255,255,255,.2); }
body.lightbox-open { overflow: hidden; }
@media (max-width: 560px) {
  .storefront-zoom { width: 34px; height: 34px; right: 8px; bottom: 8px; }
  .photo-lightbox { padding: 12px; }
  .photo-lightbox .lightbox-close { top: 10px; right: 10px; width: 38px; height: 38px; }
}

.photo-lightbox .lightbox-close:focus { outline: none; }
.photo-lightbox .lightbox-close:focus-visible { outline: 2px solid rgba(255,255,255,.6); outline-offset: 2px; }

/* Lightbox: tap-to-zoom 2x with drag/scroll so shop-sign text is readable. */
.photo-lightbox.is-zoomed { overflow: auto; align-items: flex-start; justify-content: flex-start; }
.photo-lightbox .lightbox-img { cursor: zoom-in; transition: width .18s ease; }
.photo-lightbox .lightbox-img.zoomed {
  cursor: zoom-out;
  max-width: none; max-height: none;
  width: 200%; height: auto;
}
.photo-lightbox.is-zoomed .lightbox-caption { display: none; }
