/* Keep the original framing as the gallery changes between portrait and landscape photographs. */
.gallery-stage { aspect-ratio: 4 / 3; background: #eeeadf; }
.gallery-stage .gallery-slide img { object-fit: contain; background: transparent; }
.gallery-stage .gallery-slide { transition-duration: .42s; }
.opening-shot { object-fit: contain; transition-duration: .22s; }
.welcome-copy { animation-duration: .25s; }
.food-grid { grid-template-columns: minmax(0, 27fr) minmax(0, 64fr); }
.food-art, .food-art img { background: transparent; }
.food-art img { width: 100%; height: auto; max-height: none; aspect-ratio: auto; object-fit: contain; }
@media (max-width: 590px) {
  .food-grid { grid-template-columns: 1fr; }
  .food-art img { width: auto; max-width: 100%; max-height: 70svh; }
}

.takeout-band {
  padding-block: clamp(36px, 5.5vw, 80px);
  background: #efe5d3;
  border-block: 1px solid #c4baa1;
}
.takeout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 94px);
}
.takeout-photo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 600px;
  margin-inline: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
.takeout-type > .section-title { margin: 8px 0 16px; }
.takeout-type > p:not(.section-label) { font-size: 14px; line-height: 1.9; }
.takeout-type .takeout-note { font-size: 12px; margin-top: 12px; }
.takeout-facts { border-top: 1px solid #c1b7a1; margin-top: 18px; }
.takeout-facts div { display: grid; grid-template-columns: 6em 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid #c8bea8; font-size: 13px; }
.takeout-facts dt { font-weight: 650; }
.venue-grid:has(.arrival-photos) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(26px, 5vw, 75px); }
.arrival-photos img { display: block; width: 100%; height: auto; }
.arrival-photos figcaption { margin-top: 7px; font-size: 12px; line-height: 1.65; color: #4c5045; }
.takeout-product { display: flex; align-items: center; gap: 18px; }
.takeout-product img { width: clamp(94px, 13vw, 138px); height: auto; aspect-ratio: auto; object-fit: contain; }
.takeout-product .order-item { margin: 0; }
@media (max-width: 780px) {
  .takeout-grid, .venue-grid:has(.arrival-photos) { grid-template-columns: minmax(0, 1fr); gap: 21px; }
  .takeout-photo { width: min(100%, 480px); margin-inline: auto; }
  .takeout-type > .section-title br { display: none; }
  .arrival-photos { max-width: 590px; }
}

/* A washi mount with a fine brass edge. Both rules and corner marks stay within the mat. */
.photo-mount, .card-top .entry {
  --photo-mat: clamp(9px, 1vw, 15px);
  --edge: #9c875f;
  --inner-edge: #b4a484;
  --corner: #77643f;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  min-width: 0;
  padding: var(--photo-mat);
  border: 0;
  border-radius: 0;
  background-color: #eee8d8;
  background-image: repeating-linear-gradient(103deg, transparent 0 3px, #79663b07 3px 4px),
    linear-gradient(135deg, #faf6e9 0%, #eee7d5 57%, #e9e1ce 100%);
  box-shadow: inset 0 0 0 1px var(--edge), 0 2px 5px #473d2512;
}
.photo-mount::before, .card-top .entry::before,
.photo-mount::after, .card-top .entry::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 2;
}
.photo-mount::before, .card-top .entry::before {
  --corner-long: clamp(11px, 2vw, 23px);
  --corner-ink: linear-gradient(var(--corner), var(--corner));
  inset: 3px;
  background:
    var(--corner-ink) left top / var(--corner-long) 1px,
    var(--corner-ink) left top / 1px var(--corner-long),
    var(--corner-ink) right top / var(--corner-long) 1px,
    var(--corner-ink) right top / 1px var(--corner-long),
    var(--corner-ink) left bottom / var(--corner-long) 1px,
    var(--corner-ink) left bottom / 1px var(--corner-long),
    var(--corner-ink) right bottom / var(--corner-long) 1px,
    var(--corner-ink) right bottom / 1px var(--corner-long);
  background-repeat: no-repeat;
}
.photo-mount::after, .card-top .entry::after {
  inset: calc(var(--photo-mat) - 3px);
  border: 1px solid var(--inner-edge);
}
.gallery-stage.photo-mount .gallery-slide { inset: var(--photo-mat); }
.welcome-photo.photo-mount .opening-shot {
  inset: var(--photo-mat);
  width: calc(100% - 2 * var(--photo-mat));
  height: calc(100% - 2 * var(--photo-mat));
}
.food-art.photo-mount > img, .takeout-photo.photo-mount > img,
.ichikama-reserve .booking-photo.photo-mount > img,
.takeout-product .product-picture > img,
.arrival-photos .photo-mount > img, .card-top .entry img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}
/* Match heights for the 9:16 single and 4:3 gozen after reserving both mats. */
@media (min-width: 591px) {
  .food-grid { display: flex; --food-mat: clamp(9px, 1vw, 15px); }
  .food-grid > .food-card { flex: 27 0 calc(2 * var(--food-mat)); min-width: 0; }
  .food-grid > .food-card:nth-child(2) { flex-grow: 64; }
  .food-art.photo-mount { --photo-mat: var(--food-mat); }
}
.food-art.photo-mount { align-self: start; }
.takeout-photo.photo-mount { justify-self: center; width: min(100%, 438px); }
.ichikama-reserve .booking-photo.photo-mount { width: min(100%, 240px); }
.takeout-product .product-picture { --photo-mat: 8px; flex: 0 0 clamp(95px, 13vw, 138px); }
.card-top .entry { --photo-mat: 9px; height: 100%; min-height: 0; }
.card-top .entry img { height: 100%; }

/* The two originals are 3:2 and 3:4. Split only the photo area 2:1;
   each frame first gets the same left and right mat. Captions wrap below both. */
.arrival-photos {
  --pair-mat: clamp(8px, 1vw, 13px);
  --pair-gap: clamp(8px, 1vw, 15px);
  display: flex;
  align-items: flex-start;
  gap: var(--pair-gap);
  min-width: 0;
  container-type: inline-size;
}
.arrival-photos > figure { flex: 1 0 calc(2 * var(--pair-mat)); min-width: 0; margin: 0; }
.arrival-photos > .arrival-sign { flex-grow: 2; }
.arrival-photos .photo-mount {
  --photo-mat: var(--pair-mat);
  height: calc((100cqi - var(--pair-gap) - 4 * var(--pair-mat)) / 2.25 + 2 * var(--pair-mat));
}
.arrival-photos .photo-mount > img { height: 100%; }
@media (max-width: 590px) {
  .food-art.photo-mount:has(img[src*="meal-single-full"]) { width: min(100%, calc(39.375svh + 2 * var(--photo-mat))); margin-inline: auto; }
}
