/* Collection dialogs and their public recipe menus. */
#edition-dialog {
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-padding-block: 76px 16px;
  scrollbar-width: thin;
  scrollbar-color: #a9c3db transparent;
}
#edition-dialog.is-browsing-dishes { max-width: 1040px; }
#edition-dialog.is-browsing-menu { max-width: 620px; }
#edition-dialog > header {
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 4;
  margin-bottom: 16px;
  color: #294358;
  background: #fff;
  font-weight: 650;
}
#edition-dialog.is-browsing-dishes > header { font-size: .95rem; }
#edition-dialog.is-browsing-menu > header { border-bottom: 0; margin-bottom: 6px; }
#edition-dialog [data-close-edition] { background: #edf4fa; color: #245582; }
#edition-dialog [data-close-edition]:hover { background: #dceaf7; color: #1b4874; }
#edition-dialog .edition-menu-layout {
  display: grid;
  gap: 18px;
  padding-bottom: 4px;
}
#edition-dialog .edition-menu-lead {
  display: grid;
  grid-template-columns: clamp(74px, 20vw, 105px) minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 8px;
  align-items: center;
}
#edition-dialog .edition-menu-cover {
  display: block;
  grid-row: 1 / span 2;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 6px 13px -7px #25466b60;
}
#edition-dialog .edition-menu-lead h2 {
  margin: 0;
  color: #253951;
  font: 500 clamp(1.35rem, 4.9vw, 1.85rem)/1.12 var(--serif, Georgia, serif);
  letter-spacing: -.02em;
}
#edition-dialog .edition-menu-lead .edition-status { margin: 5px 0 0; color: #52677e; }
#edition-dialog .edition-menu-intro,
#edition-dialog .edition-menu-features {
  margin: 0;
  color: #435c74;
  font-size: .875rem;
  line-height: 1.5;
}
#edition-dialog .edition-menu-features {
  padding-top: 12px;
  border-top: 1px solid #dce8f2;
}
#edition-dialog .edition-menu h3 {
  margin: 0 0 8px;
  color: #253951;
  font: 650 1rem/1.3 var(--sans, Arial, sans-serif);
}
#edition-dialog .edition-menu-chapter {
  border-bottom: 1px solid #dce8f2;
}
#edition-dialog .edition-menu-chapter:first-of-type { border-top: 1px solid #dce8f2; }
#edition-dialog .edition-menu-chapter summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 6px 8px;
  color: #294358;
  font-size: .875rem;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}
#edition-dialog .edition-menu-chapter summary::-webkit-details-marker { display: none; }
#edition-dialog .edition-menu-chapter summary:hover { background: #edf5fc; }
#edition-dialog .edition-menu-chapter summary:focus-visible { outline: 2px solid #2868a9; outline-offset: -2px; }
#edition-dialog .edition-menu-chapter[open] summary { background: #edf5fc; color: #245582; }
#edition-dialog .edition-menu-count { color: #52677e; font-size: .75rem; white-space: nowrap; }
#edition-dialog .edition-menu-chapter summary svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#edition-dialog .edition-menu-chapter[open] summary svg { transform: rotate(180deg); }
#edition-dialog .edition-menu ul {
  margin: 0;
  padding: 10px 10px 10px 24px;
  columns: 2 12rem;
  column-gap: 24px;
  color: #324e66;
  font-size: .875rem;
  line-height: 1.45;
}
#edition-dialog .edition-menu li { padding-block: 3px; break-inside: avoid; }
#edition-dialog .edition-menu-bonus { margin-top: 12px; }
#edition-dialog .edition-menu-bonus h4 { margin: 0; color: #294358; font-size: .875rem; }
#edition-dialog .edition-menu-bonus ul { padding-block: 4px 0; }
#edition-dialog .dish-browser { margin: 0; padding: 0; }
.dish-browser-grid {
  display: grid;
  grid-template-columns: minmax(200px, .75fr) minmax(0, 1.4fr);
  gap: 20px;
  align-items: start;
}
.dish-browser .dish-list {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-height: min(560px, 72dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 4px;
  scrollbar-width: thin;
  scrollbar-color: #a9c3db transparent;
}
.dish-browser .dish-choice {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
  width: 100%;
  min-height: 74px;
  padding: 7px;
  border: 1px solid #dce8f2;
  border-radius: 10px;
  background: #fff;
  color: #293b52;
  text-align: left;
  cursor: pointer;
  font: 600 .875rem/1.35 var(--sans, Arial, sans-serif);
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.dish-browser .dish-choice > img {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
}
.dish-browser .dish-choice[aria-pressed="true"] {
  background: #245582;
  border-color: #245582;
  color: #fff;
}
.dish-browser .dish-choice:focus-visible,
.dish-browser .dish-stepper button:focus-visible,
#edition-dialog [data-close-edition]:focus-visible {
  outline: 2px solid #2868a9;
  outline-offset: 2px;
}
.dish-browser .dish-choice:focus-visible { outline-offset: -3px; }
.dish-browser .dish-choice[aria-pressed="true"]:focus-visible { outline-color: #fff; }
.dish-browser .dish-feature {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px -15px #25466b60;
}
.dish-feature-image { margin: 0; background: #f0f6fb; }
.dish-browser .dish-feature-image > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.dish-feature-copy { padding: 20px 22px; }
#edition-dialog .dish-feature h3 {
  margin: 0;
  color: #253951;
  font: 650 clamp(1.25rem, 2.3vw, 1.65rem)/1.2 var(--sans, Arial, sans-serif);
  letter-spacing: -.02em;
}
#edition-dialog .dish-feature-description {
  margin: 10px 0;
  color: #475d73;
  font-size: .9375rem;
  line-height: 1.55;
}
#edition-dialog .dish-feature-yield {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 0;
  color: #52677e;
  font-size: .875rem;
}
#edition-dialog .dish-feature-yield[hidden] { display: none; }
.dish-feature-yield svg, .dish-stepper button svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dish-stepper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #dce8f2;
}
.dish-browser .dish-stepper button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: min(100%, 112px);
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid #d1e2f1;
  border-radius: 8px;
  background: #edf5fc;
  color: #245582;
  cursor: pointer;
  font: 650 .875rem/1.2 var(--sans, Arial, sans-serif);
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.dish-stepper button:last-child { justify-self: end; }
.dish-stepper button:disabled { opacity: .45; cursor: default; }
.dish-browser .dish-stepper button:not(:disabled):active {
  background: #245582;
  border-color: #245582;
  color: #fff;
}
.dish-position { color: #52677e; font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dish-browser .dish-browser-status {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (hover: hover) {
  .dish-browser .dish-choice:hover { background: #edf5fc; border-color: #afcde7; }
  .dish-browser .dish-choice[aria-pressed="true"]:hover { background: #1e486f; border-color: #1e486f; color: #fff; }
  .dish-browser .dish-stepper button:not(:disabled):hover { background: #245582; border-color: #245582; color: #fff; }
}
@media (max-width: 700px) {
  #edition-dialog { width: calc(100% - 20px); padding: 0 14px 16px; max-height: 94dvh; }
  #edition-dialog > header { margin-bottom: 12px; }
  .dish-browser-grid { display: flex; flex-direction: column; gap: 12px; }
  .dish-browser .dish-feature { width: 100%; }
  .dish-browser .dish-feature-image > img { aspect-ratio: 1.5; max-height: 285px; }
  .dish-feature-copy { padding: 16px; }
  .dish-browser .dish-stepper button { gap: 4px; padding-inline: 5px; font-size: .8125rem; }
  .dish-stepper button svg { flex-basis: 16px; width: 16px; height: 16px; }
  .dish-browser .dish-list {
    flex-direction: row;
    width: 100%;
    max-height: none;
    padding: 2px 2px 9px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
  }
  .dish-browser .dish-choice {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 126px;
    gap: 7px;
    min-height: 0;
    scroll-snap-align: start;
  }
  .dish-browser .dish-choice > img { width: 100%; height: auto; aspect-ratio: 4/3; }
}
@media (max-width: 480px) {
  #edition-dialog .edition-menu-layout { gap: 14px; }
  #edition-dialog .edition-menu-cover { grid-row: auto; }
  #edition-dialog .edition-menu-intro { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .dish-browser * { scroll-behavior: auto !important; transition: none !important; }
}
