:root { --brb-detail-gallery-ratio: 4 / 5; }
.brb-count-chip {
  --brb-mark-width: 10px;
  --brb-mark-height: 7px;
  --brb-mark-offset: 3px;
  position: relative; display: block;
  width: calc(var(--brb-mark-width) + var(--brb-mark-offset));
  height: calc(var(--brb-mark-height) + var(--brb-mark-offset));
  padding: 0; border: 0; background: transparent; color: rgb(255,255,255);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.58)) drop-shadow(0 0 1px rgba(0,0,0,.55));
  font-size: 0; line-height: 0; pointer-events: none;
}
.brb-count-chip::before,
.brb-count-chip::after {
  content: ''; position: absolute; box-sizing: border-box;
  width: var(--brb-mark-width); height: var(--brb-mark-height);
  border: 1.25px solid currentColor; border-radius: 2px;
}
.brb-count-chip::before { top: 0; left: 0; }
.brb-count-chip::after { right: 0; bottom: 0; }
.brb-count-chip--photo-mark {
  --brb-mark-width: 13px; --brb-mark-height: 13px; --brb-mark-offset: 5px;
  color: rgb(255,255,255);
  filter:
    drop-shadow(0 0 .5px rgba(20,16,12,.95))
    drop-shadow(0 0 1.5px rgba(20,16,12,.85))
    drop-shadow(0 1px 2px rgba(20,16,12,.45));
}
.brb-count-chip--photo-mark::before,
.brb-count-chip--photo-mark::after {
  border-radius: 3.5px;
}
.brb-count-chip--photo-mark::before {
  z-index: 1; border: 0; background: currentColor;
}
.brb-count-chip--photo-mark::after {
  border: 1.75px solid currentColor; background: transparent;
}
.brb-count-chip--carousel-position {
  --brb-mark-width: 10px; --brb-mark-height: 7px; --brb-mark-offset: 3px;
}
.brb-count-chip--thumbnail-control,
.brb-count-chip--mini-row {
  --brb-mark-width: 8px; --brb-mark-height: 6px; --brb-mark-offset: 3px;
}
.brb-gallery-host { width: 100%; }
.doc-editor-thumbnail-slot > .brb-gallery-host { height: 100%; }
.brb-gallery-title-chip,
.brb-gallery-title-chip-loading {
  position: relative; display: grid; width: 44px; height: 44px; padding: 0;
  place-items: center; overflow: hidden; border: 1px solid rgba(83,61,43,.2);
  border-radius: 12px; background: var(--section-bg); color: var(--rust);
}
.brb-gallery-title-chip {
  appearance: none; -webkit-appearance: none; cursor: zoom-in;
  box-shadow: 0 2px 7px rgba(60,42,30,.08);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.brb-gallery-title-chip.is-add { border-style: dashed; cursor: pointer; }
.brb-gallery-title-chip-image {
  width: 100%; height: 100%; display: block; object-fit: cover;
}
.brb-gallery-title-chip-empty {
  display: grid; place-items: center; width: 100%; height: 100%;
  font: 500 25px/1 var(--font-app);
}
.brb-gallery-title-chip-count,
.brb-gallery-title-chip-add {
  position: absolute; right: 2px; bottom: 2px; z-index: 2;
  pointer-events: none;
}
.brb-gallery-title-chip-count {
  --brb-mark-width: 8px; --brb-mark-height: 6px; --brb-mark-offset: 3px;
  min-width: 0; padding: 0;
}
.brb-gallery-title-chip-add {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0; border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  background: rgba(31,26,22,.82); color: var(--card-bg);
  font: 750 14px/1 var(--font-app);
}
.brb-gallery-title-chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.brb-gallery-title-chip:active { transform: scale(.96); }
.brb-gallery-title-chip-loading {
  border-style: dashed; opacity: .62;
}
.brb-gallery-title-chip-loading::after {
  content: ''; width: 16px; height: 16px; border: 2px solid rgba(160,82,45,.28);
  border-top-color: var(--rust); border-radius: 50%; animation: brbGalleryTitleChipSpin .8s linear infinite;
}
@keyframes brbGalleryTitleChipSpin { to { transform: rotate(360deg); } }
@media (hover: hover) {
  .brb-gallery-title-chip:hover {
    border-color: rgba(160,82,45,.54);
    box-shadow: 0 4px 11px rgba(60,42,30,.15);
    transform: translateY(-1px);
  }
}
.pizza-photo-wrap > .brb-gallery-host { position: relative; z-index: 2; }
.adm-gallery-editor { margin: 18px 0; padding: 14px; border: 1px solid rgba(83,61,43,.18); border-radius: 12px; }
.adm-gallery-list { display: grid; gap: 10px; margin: 12px 0; }
.adm-gallery-row {
  display: grid; grid-template-columns: 72px 82px minmax(180px, 1fr) auto auto;
  gap: 9px; align-items: end; padding: 9px; border-radius: 10px; background: var(--section-bg);
}
.adm-gallery-row img { width: 72px; height: auto; aspect-ratio: var(--brb-detail-gallery-ratio); border-radius: 8px; object-fit: cover; }
.adm-gallery-row label { display: grid; gap: 4px; font-size: 11px; color: var(--stone); }
.adm-gallery-row input { width: 100%; min-height: 44px; border: 1px solid rgba(83,61,43,.25); border-radius: 7px; padding: 7px; }
.adm-gallery-editor .adm-btn { min-height: 44px; }
.adm-gallery-row.is-cover { align-items: center; }
.adm-gallery-sequence { color: var(--stone); font: 700 12px/1.2 var(--font-app); text-align: center; }
.adm-gallery-cover-copy { display: grid; gap: 3px; align-self: center; color: var(--stone); font: 500 12px/1.4 var(--font-app); }
.adm-gallery-cover-copy strong { color: var(--ink); font-size: 13px; }
.adm-gallery-cover-pill {
  min-height: 28px; padding: 5px 9px; border-radius: 999px; align-self: center;
  background: var(--card-bg); color: var(--rust); font: 700 11px/18px var(--font-app);
  letter-spacing: .06em; text-transform: uppercase;
}
.adm-gallery-description-list { display: grid; gap: 12px; max-height: min(52vh, 520px); overflow: auto; padding-right: 4px; }
@media (max-width: 720px) {
  .adm-gallery-row { grid-template-columns: 64px minmax(70px, 96px) minmax(0, 1fr); align-items: start; }
  .adm-gallery-row label.is-wide { grid-column: 3; }
  .adm-gallery-row [data-gallery-make-cover] { grid-column: 2; }
  .adm-gallery-row [data-gallery-remove] { grid-column: 3; }
  .adm-gallery-row.is-cover .adm-gallery-cover-pill { grid-column: 2 / -1; justify-self: start; }
}
.brb-gallery {
  position: relative; width: 100%; min-width: 0; display: grid;
  grid-template-rows: auto auto; border-radius: inherit;
  background: var(--section-bg); touch-action: pan-y;
}
.brb-gallery:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.brb-gallery-viewport {
  position: relative; width: 100%; min-width: 0;
  aspect-ratio: var(--brb-detail-gallery-ratio); overflow: hidden;
  border-radius: inherit; background: var(--section-bg);
}
.brb-gallery-media-slot { width: 100%; height: 100%; }
.brb-gallery-media-button {
  width: 100%; height: 100%; display: block; padding: 0; border: 0;
  border-radius: inherit; background: transparent; color: inherit; cursor: zoom-in;
}
.brb-gallery-media-button .brb-gallery-media-slot { display: block; }
.brb-gallery-media-button:focus-visible {
  outline: 2px solid var(--card-bg); outline-offset: -5px; box-shadow: inset 0 0 0 7px var(--rust);
}
.brb-gallery-image {
  width: 100%; height: 100%; display: block; object-fit: cover; pointer-events: none;
  transform-origin: center; will-change: transform;
}
.brb-gallery-nav {
  position: static; width: 44px; height: 44px; margin: 0; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--stone);
  font: 650 20px/1 var(--font-app);
  display: grid; place-items: center; cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease;
}
.brb-gallery-nav:focus-visible { outline: 2px solid var(--rust); outline-offset: 0; box-shadow: none; }
.brb-gallery-nav:active { color: var(--ink); background: rgba(160,82,45,.08); }
@media (hover: hover) {
  .brb-gallery-nav:hover { color: var(--ink); background: rgba(160,82,45,.06); }
}
.brb-gallery-rail {
  width: 100%; min-width: 0; height: 36px; margin-top: 8px;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
}
.brb-gallery-position {
  position: static; min-width: 0; display: grid; place-items: center;
}
.brb-gallery-dots {
  min-width: 0; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; pointer-events: none;
}
.brb-gallery-dot {
  width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%;
  background: var(--stone-light);
}
.brb-gallery-dot.is-active {
  width: 8px; height: 8px; flex-basis: 8px; background: var(--rust);
}
.brb-gallery-read-cover-pill,
.brb-gallery-manage-trigger {
  position: absolute; top: 10px; z-index: 3; min-height: 32px;
  border-radius: 999px; font: 750 11px/20px var(--font-app);
  letter-spacing: .03em;
}
.brb-gallery-read-cover-pill {
  left: 10px; padding: 6px 10px; background: rgba(31,26,22,.78);
  color: var(--card-bg); text-transform: uppercase; letter-spacing: .06em;
}
.brb-gallery-manage-trigger {
  right: 10px; padding: 5px 11px; border: 1px solid rgba(255,255,255,.72);
  background: rgba(31,26,22,.72); color: var(--card-bg); cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.brb-gallery-manage-trigger:focus-visible {
  outline: 2px solid var(--card-bg); outline-offset: 2px; box-shadow: 0 0 0 4px var(--rust);
}
.brb-gallery-manage-trigger:active { transform: scale(.98); }
@media (hover: hover) {
  .brb-gallery-manage-trigger:hover {
    border-color: var(--card-bg); background: rgba(31,26,22,.88);
    box-shadow: 0 4px 12px rgba(31,26,22,.2); transform: translateY(-1px);
  }
}
.brb-gallery-owner-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.brb-gallery-action {
  min-height: 44px; padding: 8px 11px; border: 1px solid rgba(83,61,43,.24);
  border-radius: 9px; background: var(--card-bg); color: var(--ink);
  font: 700 12px/1.2 var(--font-app); cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.brb-gallery-action.is-add { background: var(--rust); border-color: var(--rust); color: var(--card-bg); }
.brb-gallery-action.is-remove { color: var(--danger-hover); }
.brb-gallery-action:disabled { opacity: .45; cursor: default; }
.brb-gallery-action:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.brb-gallery-action:active:not(:disabled) { transform: scale(.98); }
@media (hover: hover) {
  .brb-gallery-action:hover:not(:disabled) {
    border-color: rgba(160,82,45,.48); background: var(--section-bg); color: var(--rust);
    box-shadow: 0 3px 8px rgba(60,42,30,.1); transform: translateY(-1px);
  }
  .brb-gallery-action.is-add:hover:not(:disabled) {
    border-color: var(--rust-hover); background: var(--rust-hover); color: var(--card-bg);
  }
  .brb-gallery-action.is-remove:hover:not(:disabled) {
    border-color: rgba(160,64,48,.42); background: rgba(160,64,48,.08); color: var(--danger-hover);
  }
}
.brb-gallery-cover-pill {
  min-height: 28px; padding: 5px 9px; border-radius: 999px;
  background: var(--section-bg); color: var(--rust);
  font: 700 11px/18px var(--font-app); letter-spacing: .06em; text-transform: uppercase;
}
.brb-gallery-danger-zone {
  display: inline-flex; margin-left: 4px; padding-left: 10px;
  border-left: 1px solid rgba(83,61,43,.18);
}
.brb-gallery-provenance {
  flex-basis: 100%; color: var(--stone); font: 500 12px/1.45 var(--font-app);
}
.brb-gallery-read-provenance {
  display: block; margin-top: 8px; color: var(--stone); font: 500 12px/1.45 var(--font-app);
}
.brb-gallery-status { flex-basis: 100%; font: 500 12px/1.45 var(--font-app); color: var(--stone); }
.brb-modal-overlay.brb-lightbox-overlay {
  align-items: stretch; justify-content: stretch; padding: 0;
  background: rgba(31,26,22,.94); backdrop-filter: none; -webkit-backdrop-filter: none;
}
.brb-lightbox-modal.brb-modal-shell,
.modal.brb-lightbox-modal.brb-modal-shell {
  width: 100%; max-width: none; height: var(--brb-modal-viewport-height);
  max-height: var(--brb-modal-viewport-height); padding: 0; overflow: hidden;
  border-radius: 0; background-color: var(--ink); box-shadow: none;
}
.brb-lightbox-modal .brb-modal-header { height: 72px; }
.brb-lightbox-modal .modal-close-x.brb-modal-close {
  top: max(14px, env(safe-area-inset-top, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
  width: 44px; height: 44px; border-color: rgba(255,255,255,.72);
  background: rgba(31,26,22,.78); color: rgb(255,255,255);
}
.brb-lightbox-modal .modal-close-x.brb-modal-close:hover {
  border-color: rgba(255,255,255,.92); background: rgba(31,26,22,.94); color: rgb(255,255,255);
}
.brb-lightbox-modal .modal-close-x.brb-modal-close:focus-visible {
  outline: 2px solid var(--card-bg); outline-offset: 2px; box-shadow: 0 0 0 4px var(--rust);
}
.brb-lightbox-modal .brb-modal-content { width: 100%; height: 100%; padding: 0; }
.brb-lightbox {
  width: 100%; height: 100%; min-width: 0; display: grid;
  grid-template-rows: minmax(0, 1fr) auto; overflow: hidden;
}
.brb-lightbox-stage {
  position: relative; min-width: 0; min-height: 0; overflow: hidden;
  display: grid; place-items: center; background: var(--ink); color: var(--card-bg);
  touch-action: pan-y; outline: none;
}
.brb-lightbox-stage:focus-visible { outline: 2px solid var(--rust); outline-offset: -4px; }
.brb-lightbox-media {
  width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden;
  touch-action: none; overscroll-behavior: contain;
}
.brb-lightbox-image {
  width: 100%; height: 100%; display: block; object-fit: contain;
  object-position: center; user-select: none; -webkit-user-drag: none;
  pointer-events: none; transform-origin: 50% 50%; will-change: transform;
}
.brb-lightbox-nav {
  position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px;
  display: grid; place-items: center; padding: 0;
  border: 1px solid rgba(255,255,255,.38); border-radius: 50%;
  background: rgba(255,255,255,.14); color: rgb(255,255,255);
  font: 650 22px/1 var(--font-app); cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color 140ms ease, opacity 140ms ease, transform 140ms ease;
}
.brb-lightbox-nav.is-prev { left: max(14px, env(safe-area-inset-left, 0px)); }
.brb-lightbox-nav.is-next { right: max(14px, env(safe-area-inset-right, 0px)); }
.brb-lightbox-nav:focus-visible {
  outline: 2px solid var(--card-bg); outline-offset: 2px; box-shadow: 0 0 0 4px var(--rust);
}
.brb-lightbox-nav:active:not(:disabled) { transform: scale(.96); }
@media (hover: hover) {
  .brb-lightbox-nav:hover:not(:disabled) { background: rgba(255,255,255,.24); transform: translateY(-1px); }
}
.brb-lightbox-position {
  position: static; min-width: 0; grid-column: 1 / -1;
  display: grid; place-items: center;
}
.brb-lightbox-footer {
  min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 10px 18px;
  padding: 10px max(20px, env(safe-area-inset-right, 0px))
    max(14px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  border-top: 1px solid rgba(160,82,45,.3); background: var(--card-bg); color: var(--ink);
}
.brb-lightbox-context { min-width: 0; display: grid; gap: 3px; font-family: var(--font-app); }
.brb-lightbox-context strong {
  overflow-wrap: anywhere; font-size: clamp(15px, 2vw, 18px); line-height: 1.25;
}
.brb-lightbox-context .brb-lightbox-tagline {
  max-width: 66ch; overflow-wrap: anywhere; color: var(--stone); font-size: 12px; line-height: 1.4;
}
.brb-lightbox-context .brb-lightbox-tagline.is-editorial {
  color: var(--rust); font-family: var(--font-prose); font-size: clamp(13px, 1.5vw, 15px);
  font-style: italic;
}
.brb-lightbox-actions { min-width: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.brb-lightbox-action {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 13px; border: 1px solid rgba(83,61,43,.26); border-radius: 9px;
  background: var(--section-bg); color: var(--ink); text-decoration: none;
  font: 750 12px/1.2 var(--font-app); cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.brb-lightbox-action:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.brb-lightbox-action:active { transform: scale(.98); }
@media (hover: hover) {
  .brb-lightbox-action:hover {
    border-color: rgba(160,82,45,.48); background: var(--cream); color: var(--rust);
    box-shadow: 0 3px 8px rgba(60,42,30,.1); transform: translateY(-1px);
  }
}
.brb-lightbox-load-state {
  position: absolute; inset: 0; z-index: 3; display: grid; place-content: center;
  justify-items: center; gap: 12px; padding: 24px;
  background: rgba(31,26,22,.9); color: var(--card-bg);
  font: 700 14px/1.4 var(--font-app); text-align: center;
}
.brb-lightbox-load-state.is-error { background: rgba(31,26,22,.96); }
.brb-lightbox-retry {
  min-width: 112px; min-height: 44px; padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.76); border-radius: 9px;
  background: transparent; color: var(--card-bg);
  font: 750 12px/1.2 var(--font-app); cursor: pointer;
}
.brb-lightbox-retry:focus-visible {
  outline: 2px solid var(--card-bg); outline-offset: 2px; box-shadow: 0 0 0 4px var(--rust);
}
.brb-gallery-manager-modal.brb-modal-shell,
.modal.brb-gallery-manager-modal.brb-modal-shell {
  width: min(700px, calc(100vw - 32px)); max-width: 700px;
  max-height: min(820px, calc(var(--brb-modal-viewport-height) - 32px)); padding: 0;
}
.brb-gallery-manager-modal .brb-modal-content { overflow: auto; }
.brb-gallery-manager {
  display: grid; grid-template-columns: minmax(0, 320px) minmax(220px, 1fr);
  gap: 16px 22px; align-items: start;
}
.brb-gallery-manager > .modal-eyebrow,
.brb-gallery-manager > .modal-title,
.brb-gallery-manager > .modal-sub,
.brb-gallery-manager > .brb-gallery-manager-privacy,
.brb-gallery-manager > .brb-gallery-manager-status {
  grid-column: 1 / -1;
}
.brb-gallery-manager > .modal-title { margin-top: -10px; }
.brb-gallery-manager > .modal-sub { margin: -8px 0 2px; }
.brb-gallery-manager-preview {
  position: relative; grid-column: 1; grid-row: 4 / span 2; width: min(320px, 100%);
  aspect-ratio: var(--brb-detail-gallery-ratio); overflow: hidden;
  border: 1px solid rgba(83,61,43,.16); border-radius: 14px; background: var(--section-bg);
}
.brb-gallery-manager-preview img,
.brb-gallery-manager-remove-preview img {
  width: 100%; height: 100%; display: block; object-fit: cover;
}
.brb-gallery-manager-cover-badge {
  position: absolute; top: 10px; left: 10px; min-height: 28px; padding: 4px 9px;
  border-radius: 999px; background: rgba(31,26,22,.78); color: var(--card-bg);
  font: 750 11px/20px var(--font-app); letter-spacing: .06em; text-transform: uppercase;
}
.brb-gallery-manager-empty {
  grid-column: 1; grid-row: 4 / span 2; min-height: 240px; padding: 24px;
  display: grid; align-content: center; justify-items: center; gap: 7px;
  border: 1px dashed rgba(160,82,45,.42); border-radius: 14px;
  background: var(--section-bg); color: var(--stone); text-align: center;
  font: 500 13px/1.5 var(--font-app);
}
.brb-gallery-manager-empty strong { color: var(--ink); font-size: 15px; }
.brb-gallery-manager-thumbs {
  grid-column: 2; display: grid; grid-template-columns: repeat(4, minmax(54px, 1fr));
  gap: 8px; align-content: start;
}
.brb-gallery-manager-thumb {
  position: relative; min-width: 0; aspect-ratio: var(--brb-detail-gallery-ratio);
  overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 9px;
  background: var(--section-bg); cursor: pointer;
}
.brb-gallery-manager-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.brb-gallery-manager-thumb.is-selected { border-color: var(--rust); box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 4px rgba(160,82,45,.28); }
.brb-gallery-manager-thumb:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.brb-gallery-manager-thumb:disabled { cursor: default; opacity: .58; }
.brb-gallery-manager-thumb-cover {
  position: absolute; top: 4px; left: 4px; width: 22px; height: 22px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(31,26,22,.78); color: var(--card-bg); font: 700 12px/1 var(--font-app);
}
.brb-gallery-manager-actions {
  grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; align-content: start;
}
.brb-gallery-manager-action {
  min-height: 44px; padding: 9px 13px; border: 1px solid rgba(83,61,43,.24);
  border-radius: 9px; background: var(--card-bg); color: var(--ink);
  font: 750 12px/1.2 var(--font-app); cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.brb-gallery-manager-action.is-primary { background: var(--rust); border-color: var(--rust); color: var(--card-bg); }
.brb-gallery-manager-action.is-danger { color: var(--danger-hover); }
.brb-gallery-manager-action:disabled { opacity: .48; cursor: default; }
.brb-gallery-manager-action:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.brb-gallery-manager-action:active:not(:disabled) { transform: scale(.98); }
@media (hover: hover) {
  .brb-gallery-manager-action:hover:not(:disabled) {
    border-color: rgba(160,82,45,.48); background: var(--section-bg); color: var(--rust);
    box-shadow: 0 3px 8px rgba(60,42,30,.1); transform: translateY(-1px);
  }
  .brb-gallery-manager-action.is-primary:hover:not(:disabled) {
    border-color: var(--rust-hover); background: var(--rust-hover); color: var(--card-bg);
  }
  .brb-gallery-manager-action.is-danger:hover:not(:disabled) {
    border-color: rgba(160,64,48,.42); background: rgba(160,64,48,.08); color: var(--danger-hover);
  }
}
.brb-gallery-manager-privacy,
.brb-gallery-manager-status {
  margin: 0; color: var(--stone); font: 500 12px/1.45 var(--font-app);
}
.brb-gallery-manager-status { min-height: 18px; }
.brb-gallery-manager-subview { display: grid; gap: 14px; }
.brb-gallery-manager-subview > .modal-title { margin-top: -10px; }
.brb-gallery-manager-subview > .modal-sub { margin: -8px 0 0; }
.brb-gallery-manager-field { display: grid; gap: 6px; color: var(--ink); font: 700 12px/1.3 var(--font-app); }
.brb-gallery-manager-field textarea {
  width: 100%; min-height: 120px; resize: vertical; padding: 11px 12px;
  border: 1px solid rgba(83,61,43,.26); border-radius: 9px;
  background: var(--card-bg); color: var(--ink); font: 500 14px/1.5 var(--font-app);
}
.brb-gallery-manager-field textarea:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.brb-gallery-manager-subview-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.brb-gallery-manager-remove-preview {
  width: min(180px, 100%); aspect-ratio: var(--brb-detail-gallery-ratio);
  overflow: hidden; border: 1px solid rgba(83,61,43,.16); border-radius: 12px;
}
.brb-gallery-inline-manager { position: relative; }
.brb-gallery-inline-manager.has-menu { padding-bottom: 150px; }
.brb-gallery-inline-strip {
  display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden;
  padding: 4px 4px 8px; overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity; scrollbar-width: thin;
}
.brb-gallery-inline-tile,
.brb-gallery-inline-add-wrap {
  position: relative; flex: 0 0 88px; aspect-ratio: var(--brb-detail-gallery-ratio);
  scroll-snap-align: start;
}
.brb-gallery-inline-select,
.brb-gallery-inline-fallback,
.brb-gallery-inline-add {
  width: 100%; height: 100%; display: block; overflow: hidden; padding: 0;
  border: 2px solid transparent; border-radius: 10px; background: var(--card-bg);
}
.brb-gallery-inline-select { position: relative; cursor: pointer; }
.brb-gallery-inline-select img,
.brb-gallery-inline-fallback img {
  width: 100%; height: 100%; display: block; object-fit: cover;
}
.brb-gallery-inline-tile.is-selected .brb-gallery-inline-select {
  border-color: var(--rust);
  box-shadow: 0 0 0 2px var(--section-bg), 0 0 0 4px rgba(160,82,45,.28);
}
.brb-gallery-inline-select:focus-visible {
  outline: none; border-color: var(--rust); box-shadow: var(--focus-ring);
}
.brb-gallery-inline-select:disabled { cursor: default; opacity: .62; }
.brb-gallery-inline-cover,
.brb-gallery-inline-fallback span {
  position: absolute; top: 6px; left: 6px; min-width: 24px; min-height: 24px;
  display: grid; place-items: center; border-radius: 999px;
  background: rgba(31,26,22,.8); color: var(--card-bg);
  font: 750 12px/1 var(--font-app);
}
.brb-gallery-inline-fallback { position: relative; border-color: rgba(83,61,43,.16); }
.brb-gallery-inline-fallback span {
  top: auto; right: 6px; bottom: 6px; left: 6px; min-height: 26px;
  padding: 4px 7px; font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
}
.brb-gallery-inline-menu-trigger {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.75);
  border-radius: 50%; background: rgba(31,26,22,.76); color: var(--card-bg);
  font: 800 20px/1 var(--font-app); cursor: pointer;
  opacity: 0; pointer-events: none; transform: translateY(-2px);
  transition: opacity 140ms ease, transform 140ms ease, background-color 140ms ease;
}
.brb-gallery-inline-tile:is(:hover, :focus-within, .is-selected) .brb-gallery-inline-menu-trigger,
.brb-gallery-inline-menu-trigger[aria-expanded="true"] {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.brb-gallery-inline-menu-trigger:focus-visible {
  outline: 2px solid var(--card-bg); outline-offset: 2px; box-shadow: 0 0 0 4px var(--rust);
}
.brb-gallery-inline-menu-trigger:disabled { cursor: default; opacity: .45; }
.brb-gallery-inline-add {
  display: grid; place-items: center; align-content: center; gap: 6px;
  border: 2px dashed rgba(160,82,45,.48); color: var(--rust); cursor: pointer;
  font-family: var(--font-app);
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.brb-gallery-inline-add span { font-size: 30px; font-weight: 400; line-height: .8; }
.brb-gallery-inline-add strong { font-size: 11px; line-height: 1.1; }
.brb-gallery-inline-add:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.brb-gallery-inline-add:disabled {
  border-color: rgba(83,61,43,.22); color: var(--stone); cursor: default; opacity: .62;
}
.brb-gallery-inline-popover {
  position: absolute; z-index: 8; width: min(176px, calc(100% - 8px));
  display: grid; padding: 6px; border: 1px solid rgba(83,61,43,.2);
  border-radius: 10px; background: var(--card-bg); box-shadow: 0 14px 30px rgba(60,42,30,.2);
}
.brb-gallery-inline-popover button {
  min-height: 44px; display: grid; grid-template-columns: 18px minmax(0, 1fr);
  align-items: center; gap: 7px; padding: 9px 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--ink); text-align: left;
  font: 700 12px/1.25 var(--font-app); cursor: pointer;
}
.brb-gallery-inline-popover button:not([role="menuitemcheckbox"]) { grid-template-columns: minmax(0, 1fr); }
.brb-gallery-inline-popover button[aria-disabled="true"] { color: var(--stone); cursor: default; }
.brb-gallery-inline-popover button.is-danger { color: var(--danger-hover); }
.brb-gallery-inline-popover button:focus-visible {
  outline: none; background: var(--section-bg); box-shadow: inset 0 0 0 2px var(--rust);
}
.brb-gallery-inline-status {
  min-height: 18px; margin: 5px 4px 0; color: var(--stone);
  font: 500 12px/1.45 var(--font-app);
}
@media (hover: hover) {
  .brb-gallery-inline-menu-trigger:hover { background: rgba(31,26,22,.92); }
  .brb-gallery-inline-add:hover:not(:disabled) {
    border-color: var(--rust); background: rgba(160,82,45,.07);
    box-shadow: 0 4px 12px rgba(60,42,30,.1); transform: translateY(-1px);
  }
  .brb-gallery-inline-popover button:hover:not([aria-disabled="true"]) { background: var(--section-bg); color: var(--rust); }
  .brb-gallery-inline-popover button.is-danger:hover { background: rgba(160,64,48,.08); color: var(--danger-hover); }
}
.brb-gallery-load-state {
  position: absolute; inset: auto 10px 10px 10px; z-index: 4; min-height: 38px;
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 10px;
  border-radius: 9px; background: rgba(31,26,22,.78); color: var(--card-bg);
  font: 700 12px/1.35 var(--font-app); text-align: center;
}
.brb-gallery-load-state.is-error { background: rgba(31,26,22,.88); }
.brb-gallery-load-retry {
  min-height: 44px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.72);
  border-radius: 7px; background: transparent; color: inherit;
  font: 700 12px/1.2 var(--font-app); cursor: pointer;
}
.brb-gallery-load-retry:focus-visible { outline: 2px solid var(--card-bg); outline-offset: 2px; }
.brb-gallery-initial-state,
.brb-gallery-api-error {
  width: 100%; min-height: 88px; display: grid; place-items: center; gap: 7px;
  padding: 14px; border: 1px solid rgba(83,61,43,.18); border-radius: inherit;
  background: var(--section-bg); color: var(--stone); font: 500 12px/1.45 var(--font-app);
  text-align: center;
}
.brb-gallery-api-error strong { color: var(--ink); }
.brb-collection-photo-control {
  position: absolute; top: 0; right: 0; z-index: 4;
  display: inline-flex; min-width: 44px; min-height: 44px;
  border: 0; background: transparent; color: inherit;
  text-decoration: none; white-space: nowrap; cursor: zoom-in;
  appearance: none; -webkit-appearance: none;
  box-sizing: border-box;
}
.brb-collection-photo-control--overlay {
  width: 44px; height: 44px; padding: 10px 10px 0 0;
  align-items: flex-start; justify-content: flex-end;
  border-radius: 12px;
}
.brb-photo-mark {
  width: 26px; height: 26px; flex: 0 0 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; color: inherit;
  box-shadow: none;
}
.brb-collection-photo-control--overlay:hover .brb-count-chip--photo-mark,
.brb-collection-photo-control--overlay:active .brb-count-chip--photo-mark {
  filter:
    drop-shadow(0 0 .5px rgba(20,16,12,.95))
    drop-shadow(0 0 1.5px rgba(20,16,12,.95))
    drop-shadow(0 1px 2px rgba(20,16,12,.45));
}
.brb-collection-photo-control:focus { outline: none; }
.brb-collection-photo-control--overlay:focus-visible > .brb-photo-mark {
  outline: 2px solid var(--rust); outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--cream);
}
.brb-collection-photo-control--compact {
  inset: 0; width: 100%; height: 100%; min-width: 44px; min-height: 44px;
  align-items: flex-start; justify-content: flex-end; padding: 3px;
  border: 0; border-radius: inherit; background: transparent; box-shadow: none;
}
.brb-collection-photo-control--compact:hover,
.brb-collection-photo-control--compact:active {
  background: rgba(31,26,22,.08); box-shadow: none; transform: none;
}
.brb-collection-photo-control--compact:focus-visible {
  outline: 3px solid var(--rust); outline-offset: 2px; box-shadow: none;
}
.brb-compact-photo-count {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  min-width: 26px; min-height: 22px; padding: 2px 5px;
  border: 1px solid rgba(83,61,43,.18); border-radius: 999px;
  background: rgba(249,246,239,.94); color: var(--ink);
  box-shadow: 0 1px 4px rgba(31,26,22,.2);
  font: 800 10px/1 var(--font-app);
}
.brb-compact-photo-count > .brb-count-chip {
  flex: 0 0 auto; color: var(--rust); filter: none;
}
@media (prefers-reduced-motion: reduce) {
  .brb-gallery, .brb-gallery-image, .brb-gallery-action,
  .brb-gallery-rail, .brb-gallery-nav, .brb-gallery-dot,
  .brb-gallery-title-chip,
  .brb-gallery-manage-trigger, .brb-gallery-manager-action,
  .brb-lightbox-nav, .brb-lightbox-action { scroll-behavior: auto; transition: none; }
  .brb-gallery-action:hover:not(:disabled),
  .brb-gallery-action:active:not(:disabled),
  .brb-gallery-title-chip:hover,
  .brb-gallery-title-chip:active,
  .brb-gallery-manage-trigger:hover,
  .brb-gallery-manage-trigger:active,
  .brb-gallery-manager-action:hover:not(:disabled),
  .brb-gallery-manager-action:active:not(:disabled),
  .brb-gallery-inline-menu-trigger,
  .brb-gallery-inline-add,
  .brb-gallery-inline-add:hover:not(:disabled),
  .brb-photo-mark,
  .brb-count-chip--photo-mark,
  .brb-lightbox-nav:hover:not(:disabled),
  .brb-lightbox-nav:active:not(:disabled),
  .brb-lightbox-action:hover,
  .brb-lightbox-action:active { transform: none; transition: none !important; }
  .brb-gallery-title-chip-loading::after { animation: none; }
}
@media (forced-colors: active) {
  .brb-gallery-title-chip,
  .brb-gallery-title-chip-loading,
  .brb-gallery-title-chip-add {
    border-color: ButtonBorder; background: ButtonFace; color: ButtonText;
  }
  .brb-count-chip {
    outline: 1px solid ButtonBorder; outline-offset: 2px;
    background: Canvas; color: CanvasText; filter: none;
    forced-color-adjust: auto;
  }
  .brb-gallery-nav {
    border: 1px solid ButtonBorder; background: ButtonFace; color: ButtonText;
  }
  .brb-gallery-dot {
    border: 1px solid ButtonBorder; background: Canvas;
    forced-color-adjust: none;
  }
  .brb-gallery-dot.is-active {
    border-color: Highlight; background: Highlight;
  }
  .brb-gallery-title-chip-image { forced-color-adjust: none; }
  .brb-lightbox-stage,
  .brb-lightbox-load-state,
  .brb-lightbox-footer {
    background: Canvas; color: CanvasText; border-color: ButtonBorder;
  }
  .brb-lightbox-image { forced-color-adjust: none; }
  .brb-lightbox-nav,
  .brb-lightbox-action,
  .brb-lightbox-retry,
  .brb-lightbox-modal .modal-close-x.brb-modal-close {
    border: 1px solid ButtonBorder; background: ButtonFace; color: ButtonText;
  }
  .brb-collection-photo-control--overlay { border: 0; background: transparent; }
  .brb-collection-photo-control--compact {
    border: 2px solid ButtonBorder; background: transparent; color: ButtonText;
    box-shadow: none; forced-color-adjust: auto;
  }
  .brb-photo-mark {
    border: 1px solid ButtonBorder; background: ButtonFace; color: ButtonText;
    box-shadow: none; forced-color-adjust: auto;
  }
  .brb-count-chip--photo-mark {
    color: ButtonText; filter: none; outline: 0; background: transparent;
  }
  .brb-compact-photo-count {
    border-color: ButtonBorder; background: ButtonFace; color: ButtonText;
    box-shadow: none;
  }
}
@media (max-width: 600px) {
  .brb-gallery-rail {
    height: 44px; margin: 10px 0 6px;
  }
  .brb-gallery-dots { gap: 7px; }
  .brb-gallery-dot { width: 7px; height: 7px; flex-basis: 7px; }
  .brb-gallery-dot.is-active { width: 9px; height: 9px; flex-basis: 9px; }
  .brb-gallery-danger-zone { margin-left: 0; padding-left: 0; border-left: 0; }
  .brb-collection-photo-control--overlay { padding: 6px 6px 0 0; }
  .brb-lightbox-nav { top: auto; bottom: 12px; margin-top: 0; width: 48px; height: 48px; }
  .brb-lightbox-footer { grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 10px; }
  .brb-lightbox-position { grid-column: 1; }
  .brb-lightbox-actions { justify-content: stretch; }
  .brb-lightbox-action { flex: 1 1 132px; }
}
@media (max-width: 640px) {
  .brb-modal-overlay.brb-gallery-manager-overlay {
    align-items: flex-end; justify-content: center;
    padding: max(10px, env(safe-area-inset-top, 0px)) 0 0;
  }
  .brb-gallery-manager-modal.brb-modal-shell,
  .modal.brb-gallery-manager-modal.brb-modal-shell {
    width: 100%; max-height: calc(var(--brb-modal-viewport-height) - 10px);
    border-radius: 18px 18px 0 0; border-bottom: 0;
  }
  .brb-gallery-manager {
    grid-template-columns: minmax(0, 1fr); gap: 12px;
  }
  .brb-gallery-manager > .modal-eyebrow,
  .brb-gallery-manager > .modal-title,
  .brb-gallery-manager > .modal-sub,
  .brb-gallery-manager > .brb-gallery-manager-privacy,
  .brb-gallery-manager > .brb-gallery-manager-status,
  .brb-gallery-manager-preview,
  .brb-gallery-manager-empty,
  .brb-gallery-manager-thumbs,
  .brb-gallery-manager-actions {
    grid-column: 1; grid-row: auto;
  }
  .brb-gallery-manager-preview { width: min(280px, 74vw); justify-self: center; }
  .brb-gallery-manager-empty { min-height: 160px; }
  .brb-gallery-manager-thumbs {
    display: flex; overflow-x: auto; overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity; padding: 4px 3px 6px;
  }
  .brb-gallery-manager-thumb { flex: 0 0 68px; scroll-snap-align: start; }
  .brb-gallery-manager-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brb-gallery-manager-action { width: 100%; }
  .brb-gallery-manager-action.is-primary { grid-column: 1 / -1; }
  .brb-gallery-manager-subview-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
