.bi-g-gallery.project-gallery-view {
  --journal-accent: #a27643;
  position: absolute !important;
  inset: 4.6rem 0 1.8rem !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 1.4rem;
  padding: 0 clamp(1rem, 2.7vw, 3rem);
  min-height: 0;
  background: var(--bg-primary) !important;
  color: var(--text-primary);
}
body.dark .bi-g-gallery { --journal-accent: #c4a47c; }
.bi-g-gallery button:focus-visible { outline: 2px solid var(--journal-accent); outline-offset: 5px; }
.bi-g-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--border-color); pointer-events: auto; }
.bi-g-identity { min-width: 0; }
.bi-g-eyebrow, .bi-g-indexHeading, .bi-g-issue > span, .bi-g-stripLabel, .bi-g-hint, .bi-g-verticalLabel { font-size: .55rem; letter-spacing: .14em; line-height: 1.6; color: var(--text-muted); }
.bi-g-eyebrow { color: var(--journal-accent); }
.bi-g-identity h1 { font-family: Arial, Helvetica, sans-serif; font-size: clamp(1.15rem, 1.7vw, 1.75rem); font-weight: 400; line-height: 1.2; letter-spacing: -.035em; margin-top: .45rem; text-transform: none; max-width: 32ch; }
.bi-g-actions { display: flex; gap: 1.5rem; flex-shrink: 0; }
.bi-g-actions button { display: flex; align-items: center; gap: .55rem; padding: .6rem 0; font-size: .6rem; line-height: 1.4; color: var(--text-muted); transition: color .2s; }
.bi-g-actions button:hover, .bi-g-indexButton[aria-pressed="true"] { color: var(--journal-accent); }
.bi-g-actions svg { width: 1rem; height: 1rem; }
.bi-g-viewer { display: grid; grid-template-columns: clamp(100px, 13vw, 175px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; column-gap: clamp(1rem, 3vw, 3rem); min-height: 0; }
.bi-g-notes { grid-row: 1 / 3; display: flex; flex-direction: column; position: relative; padding: .8rem 0; }
.bi-g-issue > div { display: flex; align-items: baseline; gap: .4rem; margin-top: .75rem; }
.bi-g-issue > div > span { font-family: Arial, Helvetica, sans-serif; font-size: clamp(2.8rem, 4.5vw, 5rem); font-weight: 300; letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.bi-g-issue small { font-size: .65rem; color: var(--text-muted); }
.bi-g-projectMeta { display: flex; flex-direction: column; gap: .5rem; margin-top: 1.8rem; font-size: .6rem; line-height: 1.6; color: var(--text-muted); text-transform: uppercase; }
.bi-g-verticalLabel { margin-top: auto; writing-mode: vertical-rl; transform: rotate(180deg); opacity: .65; padding-top: 1.4rem; }
.bi-g-stage { position: relative; min-height: 0; overflow: hidden; touch-action: pan-y pinch-zoom; }
.bi-g-frame { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: .8rem 1.5rem; }
.bi-g-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bi-g-corner { position: absolute; z-index: 2; width: 1rem; height: 1rem; pointer-events: none; border-color: var(--journal-accent); opacity: .65; }
.bi-g-cornerTop { top: 0; left: 0; border-left: 1px solid; border-top: 1px solid; }
.bi-g-cornerBottom { bottom: 0; right: 0; border-right: 1px solid; border-bottom: 1px solid; }
.bi-g-loading { position: absolute; font-size: .6rem; letter-spacing: .12em; color: var(--text-muted); }
.bi-g-unavailable { text-align: center; font-size: .8rem; line-height: 1.8; color: var(--text-muted); }
.bi-g-unavailable p { font-size: .65rem; }
.bi-g-captionRow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.8rem; margin-top: .5rem; }
.bi-g-caption.project-gallery-caption { display: flex; gap: 1rem; align-items: baseline; font-size: .6rem; line-height: 1.5; letter-spacing: .025em; text-align: left; text-transform: none; }
.bi-g-caption > span { color: var(--journal-accent); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.bi-g-arrows { display: flex; gap: .2rem; }
.bi-g-arrows button { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; transition: background .2s, color .2s; }
.bi-g-arrows button:hover { background: var(--bg-surface); color: var(--journal-accent); }
.bi-g-arrows button:disabled { opacity: .25; cursor: default; }
.bi-g-arrows svg { width: 1.5rem; height: 1.5rem; }
.bi-g-filmstrip { display: flex; align-items: center; gap: clamp(1rem, 3vw, 3rem); border-top: 1px solid var(--border-color); padding-top: 1rem; min-width: 0; }
.bi-g-stripLabel { width: clamp(100px, 13vw, 175px); flex-shrink: 0; display: flex; flex-direction: column; gap: .35rem; }
.bi-g-stripLabel > span:last-child { color: var(--journal-accent); font-size: .5rem; }
.bi-g-thumbnails { display: flex; gap: .6rem; overflow-x: auto; overflow-y: hidden; padding: 3px 3px 9px; min-width: 0; scrollbar-width: thin; scrollbar-color: var(--border-color) transparent; }
.bi-g-thumbnail { position: relative; width: 76px; height: 64px; flex-shrink: 0; padding: 0; opacity: .4; transition: opacity .25s; }
.bi-g-thumbnail img { width: 100%; height: 48px; object-fit: cover; display: block; filter: grayscale(1); transition: filter .25s; }
.bi-g-thumbnail > span { display: block; text-align: left; font-size: .5rem; line-height: 1; margin-top: .4rem; font-variant-numeric: tabular-nums; }
.bi-g-thumbnail:hover, .bi-g-selected { opacity: 1; }
.bi-g-thumbnail:hover img, .bi-g-selected img { filter: grayscale(0); }
.bi-g-selected > span { color: var(--journal-accent); }
.bi-g-activeLine { position: absolute; bottom: -4px; left: 0; right: 0; height: 1px; background: var(--journal-accent); }
.bi-g-hint { margin-left: auto; white-space: nowrap; font-size: .5rem; }
.bi-g-index { overflow-y: auto; min-height: 0; padding: 0 .5rem .75rem 0; scrollbar-width: thin; scrollbar-color: var(--border-color) transparent; }
.bi-g-indexHeading { display: flex; justify-content: space-between; padding: .3rem 0 1.3rem; }
.bi-g-indexGrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 1.2rem; }
.bi-g-indexTile { padding: 0; text-align: left; }
.bi-g-tileImage { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-surface); }
.bi-g-tileImage img { width: 100%; height: 100%; object-fit: contain; transition: transform .6s, opacity .4s; opacity: .7; }
.bi-g-indexTile:hover img, .bi-g-indexTile:focus-visible img, .bi-g-selectedTile img { transform: scale(1.035); opacity: 1; }
.bi-g-selectedTile .bi-g-tileImage { outline: 1px solid var(--journal-accent); outline-offset: -1px; }
.bi-g-tileLabel { display: flex; align-items: center; gap: .6rem; font-size: .55rem; line-height: 1.5; padding-top: .6rem; color: var(--text-muted); text-transform: capitalize; }
.bi-g-tileLabel > span:first-child { color: var(--journal-accent); }
.bi-g-tileLabel > span:last-child { margin-left: auto; font-size: .8rem; }
@media (max-width: 1000px) {
  .bi-g-hint { display: none; }
  .bi-g-actions { gap: 1rem; }
  .bi-g-infoButton span { display: none; }
  .bi-g-indexGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .bi-g-gallery.project-gallery-view { inset: 6.4rem 0 1.8rem !important; gap: .75rem; padding: 0 .75rem; }
  .bi-g-header { align-items: center; gap: .75rem; padding-bottom: .8rem; }
  .bi-g-eyebrow { font-size: .45rem; letter-spacing: .1em; }
  .bi-g-identity h1 { font-size: 1rem; line-height: 1.25; margin-top: .35rem; }
  .bi-g-actions { gap: .3rem; }
  .bi-g-actions button { min-width: 2.5rem; min-height: 2.5rem; justify-content: center; }
  .bi-g-actions button span { display: none; }
  .bi-g-actions svg { width: 1.25rem; height: 1.25rem; }
  .bi-g-viewer { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .bi-g-notes { display: none; }
  .bi-g-frame { padding: .6rem; }
  .bi-g-captionRow { min-height: 3.2rem; gap: .5rem; }
  .bi-g-caption.project-gallery-caption { gap: .5rem; display: block; font-size: .5rem; }
  .bi-g-caption > span { display: block; margin-bottom: .25rem; }
  .bi-g-arrows button { width: 2.5rem; height: 2.5rem; }
  .bi-g-filmstrip { padding-top: .7rem; gap: 0; }
  .bi-g-stripLabel { display: none; }
  .bi-g-thumbnails { gap: .4rem; }
  .bi-g-thumbnail { width: 64px; height: 58px; }
  .bi-g-thumbnail img { height: 42px; }
  .bi-g-indexGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem .75rem; }
  .bi-g-indexHeading { font-size: .5rem; padding-bottom: .8rem; }
}
@media (max-height: 600px) and (min-width: 651px) {
  .bi-g-gallery.project-gallery-view { inset-block: 2.5rem 1rem !important; gap: .5rem; }
  .bi-g-identity h1 { font-size: 1rem; }
  .bi-g-header { padding-bottom: .5rem; }
  .bi-g-eyebrow, .bi-g-verticalLabel, .bi-g-stripLabel, .bi-g-hint { display: none; }
  .bi-g-notes { display: none; }
  .bi-g-viewer { grid-template-columns: minmax(0, 1fr); }
  .bi-g-filmstrip { padding-top: .5rem; }
  .bi-g-thumbnail { width: 54px; height: 44px; }
  .bi-g-thumbnail img { height: 28px; }
}
@media (max-height: 450px) and (min-width: 651px) {
  .bi-g-gallery.project-gallery-view { grid-template-rows: auto minmax(0, 1fr); }
  .bi-g-filmstrip { display: none; }
  .bi-g-captionRow { min-height: 2rem; margin-top: .25rem; }
  .bi-g-arrows button { width: 2.5rem; height: 2rem; }
  .bi-g-frame { padding: .3rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bi-g-gallery *, .bi-g-gallery *::before, .bi-g-gallery *::after { transition: none !important; scroll-behavior: auto !important; }
}

.bi-g-gallery.bi-g-fullscreen.project-gallery-view {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000;
  width: 100%;
  height: 100dvh;
  box-sizing: border-box;
  padding: max(.5rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  grid-template-rows: auto minmax(0, 1fr);
  gap: .5rem;
  transform: none !important;
}
.bi-g-fullscreen::backdrop { background: var(--bg-primary); }
.bi-g-fullscreen .bi-g-header { align-items: center; padding-bottom: .25rem; border: 0; }
.bi-g-fullscreen .bi-g-identity h1 { font-size: .85rem; margin: 0; }
.bi-g-fullscreen .bi-g-eyebrow, .bi-g-fullscreen .bi-g-infoButton, .bi-g-fullscreen .bi-g-notes, .bi-g-fullscreen .bi-g-filmstrip, .bi-g-fullscreen .bi-g-corner { display: none; }
.bi-g-fullscreen .bi-g-viewer { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
.bi-g-fullscreen .bi-g-frame { padding: 0; }
.bi-g-fullscreen .bi-g-captionRow { margin: 0; min-height: 2.75rem; }
.bi-g-fullscreen .bi-g-actions button { min-width: 2.75rem; min-height: 2.75rem; }
.bi-g-fullscreen .bi-g-arrows button { width: 2.75rem; height: 2.75rem; }
