dialog.rp-viewer[open] {
  --photo-width: min(91vw, 1540px);
  --photo-height: min(calc(100vh - 145px), 1100px);
  display: flex;
  flex-direction: column;
  width: fit-content;
  max-width: var(--photo-width);
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f5f3ee;
  box-shadow: none;
  font-family: Arial, sans-serif;
  color-scheme: dark;
}
dialog.rp-viewer::backdrop { background: rgb(15 17 18 / 93%); }
.rp-viewer[open] .rp-viewer-frame {
  order: 0;
  width: fit-content;
  max-width: var(--photo-width);
  height: auto;
  max-height: var(--photo-height);
  min-height: 0;
  margin: 0 auto;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 8px;
  background: transparent;
}
.rp-viewer[open] .rp-zoom-surface {
  display: block;
  width: fit-content;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.rp-viewer[open] .rp-zoom-surface img {
  display: block;
  width: auto;
  height: auto;
  max-width: var(--photo-width);
  max-height: var(--photo-height);
  margin: 0;
  object-fit: contain;
}
.rp-viewer[open] .rp-zoom-surface[aria-pressed=true] {
  width: var(--rp-zoom-width);
  max-width: none;
  min-height: 0;
}
.rp-viewer[open] .rp-zoom-surface[aria-pressed=true] img {
  width: 100%;
  max-width: none;
  max-height: none;
}
.rp-viewer[open] .rp-viewer-bar {
  position: static;
  order: 1;
  box-sizing: border-box;
  width: 0;
  min-width: 100%;
  min-height: 44px;
  gap: 12px;
  padding: 9px 0 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.rp-viewer[open] .rp-viewer-bar strong {
  flex: 1;
  margin: 0;
  color: inherit;
  font: 600 clamp(14px, 1.15vw, 18px)/1.4 Arial, sans-serif;
  text-align: left;
}
.rp-viewer[open] .rp-viewer-actions { display: flex; gap: 6px; align-items: center; }
.rp-viewer[open] .rp-viewer-actions button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: white;
  background: #303436;
  box-shadow: none;
  font-size: 0;
  cursor: pointer;
}
.rp-viewer[open] .rp-viewer-actions button[hidden] { display: none; }
.rp-viewer[open] .rp-viewer-actions button:hover { background: #484d4e; }
.rp-viewer[open] .rp-viewer-actions button:focus-visible { outline: 2px solid #ffc184; outline-offset: 3px; }
.rp-viewer[open] .rp-viewer-actions button[data-close] {
  position: absolute;
  z-index: 1;
  top: 9px;
  right: 9px;
  background: rgb(20 22 23 / 84%);
}
.rp-viewer[open] button[data-close]::before,
.rp-viewer[open] button[data-close]::after {
  position: absolute;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
}
.rp-viewer[open] button[data-close]::after { transform: rotate(-45deg); }
.rp-viewer[open] button[data-next]::before,
.rp-viewer[open] button[data-previous]::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px;
  height: 16px;
  background: currentColor;
  clip-path: polygon(16% 0, 100% 50%, 16% 100%, 0 90%, 65% 50%, 0 10%);
}
.rp-viewer[open] button[data-previous]::before { transform: scaleX(-1); }
@media (forced-colors: active) {
  .rp-viewer[open] button[data-next]::before,
  .rp-viewer[open] button[data-previous]::before {
    background: ButtonText;
    forced-color-adjust: none;
  }
}
@supports (height: 100dvh) {
  dialog.rp-viewer[open] { --photo-height: min(calc(100dvh - 145px), 1100px); }
}
@media (max-width: 650px), (max-height: 500px) {
  dialog.rp-viewer[open] {
    --photo-width: calc(100vw - max(24px, env(safe-area-inset-left, 0px) + env(safe-area-inset-right, 0px) + 16px));
    --photo-height: calc(100vh - 104px);
  }
  @supports (height: 100dvh) {
    dialog.rp-viewer[open] {
      --photo-height: calc(100dvh - 88px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }
  }
  .rp-viewer[open] .rp-viewer-bar { gap: 8px; padding-top: 7px; }
  .rp-viewer[open] .rp-viewer-frame { border-radius: 6px; }
}

.rp-recipe .rk-ingredient input:checked + span,
.rp-recipe .rk-legacy-done {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  color: #67717a;
}
.rp-recipe [data-rk-add]:disabled {
  color: #72787c;
  cursor: default;
}
