/* Named grid areas and data-expanded follow the user's expanding-bento reference.
   All areas remain rectangles; captions stay outside the photograph. */
.bento {
  grid-template-columns: repeat(4,minmax(0,1fr));
  grid-template-rows: repeat(3,minmax(0,1fr));
  grid-template-areas: var(--bento-rest);
}
.bento[data-count="7"] {
  --bento-rest: "sea sea dive japan" "bali village dive europe" "bali coast coast europe";
}
.bento[data-expanded] {
  grid-template-rows: repeat(var(--bento-rows,3),minmax(0,1fr));
  grid-template-areas: var(--bento-expanded);
}
.bento[data-count="7"][data-expanded="dive"] {
  grid-template-areas: "dive dive sea europe" "dive dive coast bali" "japan japan village village";
}
.bento > figure {
  position: relative;
  grid-area: var(--bento-area);
  margin: 0;
  min-width: 0;
  isolation: isolate;
}
.bento > figure img { object-fit: cover; }
.bento > figure.is-expanded img { object-fit: contain; background: var(--image-bed); }
.bento-trigger {
  position: absolute; inset: 0 0 23px;
  width: 100%; padding: 0;
  text-align: right; cursor: zoom-in;
  -webkit-user-select: none; user-select: none;
}
.bento-trigger[aria-pressed="true"] { cursor: zoom-out; }
.bento-trigger span {
  position: absolute; top: 0; right: 0;
  display: grid; place-items: center;
  width: 44px; height: 44px; font-size: 22px; font-weight: 400;
  color: #fff; text-shadow: 0 1px 6px #122b34;
  background: linear-gradient(225deg, rgb(6 28 37 / .45), transparent);
}
.bento-trigger:focus-visible { outline-offset: -3px; }
.bento-trigger:active { transform: none; }
.bento-hint { color: var(--muted); font-size: 11px; }
/* The media area owns the notice row, so it never covers a photo or caption. */
.experience.is-editing { grid-template-rows: 82px minmax(0,1fr) 48px 78px; }
.experience .editing-notice {
  position: static; transform: none; grid-row: 3;
  max-width: none; min-width: 0; padding: 0;
  display: flex; justify-content: space-between;
  color: var(--muted); background: transparent; font-size: 11px;
}
.experience.is-editing .control-bar { grid-row: 4; }
::view-transition-group(*) { animation-duration: 460ms; animation-timing-function: cubic-bezier(.22,.7,.2,1); }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition { pointer-events: none; }
@media (max-width: 620px) {
  .bento { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(var(--bento-mobile-rows,3),minmax(0,1fr)); grid-template-areas: var(--bento-mobile-rest); }
  .bento[data-count="7"] { --bento-mobile-rows: 5; --bento-mobile-rest: "sea sea" "bali dive" "village dive" "japan europe" "coast coast"; }
  .bento[data-expanded], .bento[data-count="7"][data-expanded="dive"] {
    grid-template-rows: repeat(var(--bento-expanded-mobile-rows),minmax(0,1fr));
    grid-template-areas: var(--bento-mobile-expanded);
  }
  .bento figcaption { font-size: 10px; line-height: 1.2; padding-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bento-trigger { bottom: 17px; }
  .bento-hint { font-size: 10px; }
  .experience.is-editing { grid-template-rows: 66px minmax(0,1fr) 48px 70px; }
  .experience .editing-notice { gap: 4px; font-size: 10px; }
}
@media (max-height: 540px) and (orientation: landscape) {
  .experience.is-editing { grid-template-rows: 56px minmax(0,1fr) 44px 56px; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: .01ms !important; }
}
