
.slideshow {
  position: absolute;
  inset: 0;
  background: var(--black);
  cursor: pointer;
  outline: 0;
}
.slideshow-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;   
  object-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}
.slideshow-image.active { opacity: 1; }
.slideshow-image.is-portrait { object-fit: contain; }   

.slideshow-exit {
  position: absolute;
  top: calc(var(--space-md) + var(--safe-top));
  right: calc(var(--space-md) + var(--safe-right));
  z-index: 2;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--white);
  color: var(--white);
}
.slideshow-exit::before {
  content: '';
  position: absolute;
  inset: 9px;
  background:
    linear-gradient(45deg, transparent calc(50% - 0.5px), currentColor calc(50% - 0.5px), currentColor calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(-45deg, transparent calc(50% - 0.5px), currentColor calc(50% - 0.5px), currentColor calc(50% + 0.5px), transparent calc(50% + 0.5px));
}
.slideshow-exit:hover { background: var(--black); }

.slideshow-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--white);
  color: var(--white);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
@media (hover: hover) {
  .slideshow:hover .slideshow-nav { opacity: 1; pointer-events: auto; }
}
.slideshow.is-expanded .slideshow-nav,
.slideshow-nav:focus-visible {
  opacity: 1;
  pointer-events: auto;
}
.slideshow-prev { left: calc(var(--space-lg) + var(--safe-left)); }
.slideshow-next { right: calc(var(--space-lg) + var(--safe-right)); }
.slideshow-prev::before,
.slideshow-next::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 12px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}
.slideshow-prev::before { transform: rotate(45deg); }
.slideshow-next::before { transform: rotate(-135deg); }
.slideshow-nav:hover { background: var(--black); }

.slideshow-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: var(--space-md) 16px calc(var(--space-md) + var(--safe-bottom));
  background: var(--black);
  color: var(--white);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.slideshow-title { font-size: var(--font-size-large); font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; }
.slideshow-year { font-size: var(--font-size-small); opacity: 0.65; }
.slideshow-detail,
.slideshow-open {
  display: none;
  font-size: var(--font-size-small);
}
.slideshow-detail { margin-top: var(--space-sm); opacity: 0.8; text-transform: uppercase; letter-spacing: 0.03em; }
.slideshow-open {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: 1px solid var(--white);
  color: var(--white);
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.slideshow-open:hover { background: var(--white); color: var(--black); }
@media (hover: hover) {
  .slideshow-caption:hover .slideshow-detail,
  .slideshow-caption:hover .slideshow-open { display: block; }
}
.slideshow.is-expanded .slideshow-detail,
.slideshow.is-expanded .slideshow-open {
  display: block;
}
.slideshow-detail:empty { display: none; }

.html-content {
  padding: var(--space-lg) calc(var(--space-lg) + 4px) var(--space-xl);
  max-width: 68ch;
  line-height: 1.55;
}
.html-content h1,
.html-content h2,
.html-content h3 { font-weight: 700; line-height: 1.2; margin-bottom: var(--space-md); text-transform: uppercase; }
.html-content h1 { font-size: var(--font-size-title); padding-bottom: var(--space-sm); border-bottom: var(--window-border) solid var(--border-color); }
.html-content h2 { font-size: var(--font-size-large); margin-top: var(--space-xl); }
.html-content p { margin-bottom: var(--space-md); }
.html-content a { text-decoration: underline; }
.html-content a:hover { background: var(--selected-bg); color: var(--selected-text); }
.html-content ul, .html-content ol { margin: 0 0 var(--space-md); padding-left: var(--space-xl); }
.error { padding: var(--space-lg); text-align: center; color: var(--accent-color); }

.about-photo {
  float: right;
  width: 38%;
  max-width: 190px;
  margin: 0 0 var(--space-md) var(--space-lg);
}
.about-photo-button {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.about-photo-button:hover img,
.about-photo-button:focus-visible img { opacity: 0.8; }
.about-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  background: var(--secondary-bg);
  border: var(--window-border) solid var(--border-color);
}
.about-photo figcaption {
  margin-top: 6px;
  font-size: var(--font-size-small);
  color: var(--accent-color);
  text-align: center;
}
@media (max-width: 420px) {
  .about-photo { float: none; width: 100%; max-width: 220px; margin: 0 auto var(--space-lg); }
}

.collection { display: flex; flex-direction: column; height: 100%; }

.collection-toolbar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  min-height: var(--menubar-height);
  padding: 0 10px;
  background: var(--secondary-bg);
  border-bottom: var(--window-border) solid var(--border-color);
}

.collection-tabs {
  display: flex;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.collection-tabs::-webkit-scrollbar { display: none; }
.collection-heading { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

.tab-button,
.tool-button {
  flex: 0 0 auto;
  height: calc(var(--menubar-height) - 2px);
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  background: var(--primary-bg);
  border: var(--window-border) solid var(--border-color);
  font-size: var(--font-size-small);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}
.tab-button:hover,
.tool-button:hover { background: var(--light-grey); }
.tab-button[aria-selected="true"],
.tool-button[aria-pressed="true"] { background: var(--selected-bg); color: var(--selected-text); }
.tab-count { margin-left: 5px; font-weight: 400; opacity: 0.6; }

.collection-tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.view-toggle { display: flex; gap: 2px; }
.sort-control { display: flex; align-items: center; gap: 5px; font-size: var(--font-size-small); font-weight: 700; }
.sort-select {
  height: calc(var(--menubar-height) - 2px);
  padding: 0 4px;
  background: var(--primary-bg);
  border: var(--window-border) solid var(--border-color);
  border-radius: 0;
  font-size: var(--font-size-small);
  font-weight: 700;
  line-height: 1;
}

@media (pointer: coarse) {
  .tab-button, .tool-button { padding: 0 12px; }
}

.collection-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  container-type: inline-size;
  container-name: collection;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px 14px;
  padding: 16px;
  align-content: start;
}

.portfolio-tile {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  text-align: left;
}

.tile-frame {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--secondary-bg);
  border: var(--window-border) solid var(--border-color);
}
.tile-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.15s ease;
}
.portfolio-tile:hover .tile-frame,
.portfolio-tile:focus-visible .tile-frame { box-shadow: var(--hard-shadow); translate: -2px -2px; }
.portfolio-tile:focus-visible { outline: 0; }
.portfolio-tile:focus-visible .tile-title { background: var(--selected-bg); color: var(--selected-text); }

.tile-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.tile-title {
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
  text-transform: uppercase;
}
.portfolio-tile:hover .tile-title { background: var(--selected-bg); color: var(--selected-text); }
.tile-year { flex: 0 0 auto; font-size: var(--font-size-small); color: var(--accent-color); }

@container collection (max-width: 520px) {
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; padding: 10px; }
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 20px 8px;
  padding: 18px 16px;
  align-content: start;
}
.icon-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-align: center;
}
.icon-tile-doc {
  position: relative;
  flex-shrink: 0;
  width: calc(var(--icon-size) * 1.15);
  height: calc(var(--icon-size) * 1.5);
  background-color: var(--primary-bg);
  background-image: repeating-linear-gradient(to bottom, transparent 0 5px, var(--border-color) 5px 6px);
  background-size: 60% 56%;
  background-position: 50% 82%;
  background-repeat: no-repeat;
  border: var(--window-border) solid var(--border-color);
}
.icon-tile-doc::before {
  content: '';
  position: absolute;
  top: calc(var(--window-border) * -1);
  right: calc(var(--window-border) * -1);
  width: 34%;
  height: 26%;
  background: var(--secondary-bg);
  border: var(--window-border) solid var(--border-color);
  border-top: 0;
  border-right: 0;
}
.icon-tile:hover .icon-tile-doc,
.icon-tile:focus-visible .icon-tile-doc { box-shadow: var(--hard-shadow); translate: -2px -2px; }
.icon-tile:focus-visible { outline: 0; }
.icon-tile-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 100%; }
.icon-tile-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  padding: 0 3px;
  font-weight: 700;
  text-transform: uppercase;
}
.icon-tile:hover .icon-tile-title,
.icon-tile:focus-visible .icon-tile-title { background: var(--selected-bg); color: var(--selected-text); }
.icon-tile-year { font-size: var(--font-size-small); color: var(--accent-color); }

@container collection (max-width: 520px) {
  .icon-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 4px; padding: 12px 10px; }
}

.collection-status {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--menubar-height);
  padding: 0 12px;
  background: var(--secondary-bg);
  border-top: var(--window-border) solid var(--border-color);
  font-size: var(--font-size-small);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.project-window .window-content {
  overflow-y: auto;
  container-type: inline-size;
  container-name: project;
}

.project-content { display: flex; flex-direction: column; min-height: 100%; }

.project-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--menubar-height);
  padding: 0 10px;
  background: var(--primary-bg);
  border-bottom: var(--window-border) solid var(--border-color);
}
.project-nav-left,
.project-nav-right { display: flex; align-items: center; gap: 5px; }
.project-nav-right { margin-left: auto; }
.project-nav-counter {
  min-width: 4.5em;
  text-align: center;
  font-size: var(--font-size-small);
  font-weight: 700;
  color: var(--accent-color);
  white-space: nowrap;
}
.project-nav-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: calc(var(--menubar-height) - 2px);
  padding: 0 8px;
  background: var(--primary-bg);
  border: var(--window-border) solid var(--border-color);
  font-size: var(--font-size-small);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.project-nav-button:hover { background: var(--selected-bg); color: var(--selected-text); }
.project-nav-button[disabled] { opacity: 0.3; pointer-events: none; }
@media (pointer: coarse) { .project-nav-button { padding: 0 12px; } }

.project-header { flex: 0 0 auto; }

.project-layout { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.project-gallery-col { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.project-text-col { min-width: 0; padding: 16px 18px 28px; }
.project-layout:not(.has-gallery) .project-text-col { max-width: 70ch; }

@container project (min-width: 680px) {
  .project-window .window-content { overflow: hidden; }
  .project-content { height: 100%; min-height: 0; }
  .project-layout { flex-direction: row; overflow: hidden; }
  .project-layout.has-gallery .project-gallery-col { flex: 1.55 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-right: var(--window-border) solid var(--border-color); }
  .project-layout.has-gallery .project-text-col { flex: 1 1 0; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
  .project-layout:not(.has-gallery) .project-text-col { flex: 1 1 auto; overflow-y: auto; }
  
}

.viewer { display: flex; flex-direction: column; min-width: 0; }

.viewer-stage-row { display: flex; align-items: center; gap: 8px; min-width: 0; }

.viewer-stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  aspect-ratio: 4 / 3;
  min-height: 200px;
  max-height: 64vh;
  max-height: 64dvh;
  background: var(--primary-bg);
  overflow: hidden;
  touch-action: pan-y;
  outline: 0;
}
.viewer-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}
/* Images are always scaled to fill the box on their nearest-fitting axis (never
   letterboxed down to a tiny size), then the cropped-off axis is slowly panned
   back and forth so the rest of the photo is still seen over time. */
.viewer-image.pan-v { animation: viewerPanV 16s ease-in-out infinite alternate; }
.viewer-image.pan-h { animation: viewerPanH 16s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) {
  .viewer-image.pan-v, .viewer-image.pan-h { animation: none; }
}
@keyframes viewerPanV { from { object-position: center top; } to { object-position: center bottom; } }
@keyframes viewerPanH { from { object-position: left center; } to { object-position: right center; } }
.viewer-stage:focus-visible { outline: 2px solid var(--border-color); outline-offset: -4px; }

.viewer-arrow,
.viewer-zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-bg);
  border: var(--window-border) solid var(--border-color);
  font-weight: 700;
  line-height: 1;
}
.viewer-arrow { flex: 0 0 auto; width: 36px; height: 44px; }
.viewer-arrow:hover,
.viewer-zoom:hover { background: var(--selected-bg); color: var(--selected-text); }
.viewer-arrow[disabled] { opacity: 0.3; pointer-events: none; }
.viewer-zoom { position: absolute; right: 10px; bottom: 10px; padding: 5px 9px; font-size: var(--font-size-small); letter-spacing: 0.04em; }
.viewer-counter {
  position: absolute;
  left: 10px; bottom: 10px;
  padding: 3px 8px;
  background: var(--primary-bg);
  border: var(--window-border) solid var(--border-color);
  font-size: var(--font-size-small);
  font-weight: 700;
}
.viewer.single .viewer-arrow,
.viewer.single .viewer-counter,
.viewer.single .viewer-thumbs { display: none; }

@media (pointer: coarse) {
  .viewer-arrow { width: 44px; height: 52px; }
  .viewer-zoom { padding: 9px 12px; }
}

.viewer-caption { display: none; }

.viewer-thumbs {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  overflow-x: auto;
  border-top: 1px solid var(--border-color);
  background: var(--primary-bg);
  scrollbar-width: thin;
}
.viewer-thumb {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 1px solid var(--border-color);
  background: var(--primary-bg);
  opacity: 0.6;
}
.viewer-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.viewer-thumb:hover { opacity: 1; }
.viewer-thumb[aria-current="true"] { opacity: 1; outline: 1px solid var(--border-color); outline-offset: 1px; }
@media (pointer: coarse) { .viewer-thumb { width: 56px; height: 56px; } }

.title-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  background: var(--cat-default);
}

.title-row .collection-tools { align-self: flex-end; }
.title-row[data-category="installations-sculptures"] { background: var(--cat-installations-sculptures); }
.title-row[data-category="objects"] { background: var(--cat-objects); }
.title-row[data-category="music-performances"] { background: var(--cat-music-performances); }
.title-row[data-category="graphics-prints"] { background: var(--cat-graphics-prints); }

.title-label {
  display: inline-block;
  font-size: calc(22px * var(--scale-factor));
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  padding: 3px 10px;
  background: var(--white);
  color: var(--black);   
  text-transform: uppercase;
}
.project-meta-panel,
.project-events-panel {
  padding: 9px 18px;
  background: none;
  border-bottom: 1px solid var(--light-grey);
}

.project-events-panel { border-top: var(--window-border) solid var(--border-color); }
.project-meta { display: flex; flex-wrap: wrap; }
.project-meta span {
  padding: 2px 14px;
  border-left: 1px solid var(--light-grey);
}
.project-meta span:first-child { border-left: 0; padding-left: 0; }
.project-meta strong,
.project-meta-detail strong {
  font-size: var(--font-size-small);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.project-meta-detail { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--light-grey); }
.project-meta-detail em { font-style: normal; }

/* Short landscape phones: shrink the title band + meta panel chrome (still worth it even
   in a single scrolling column — there's much less absolute height to spend than portrait
   has). The image keeps the same max-height: 64dvh cap portrait uses (base rule above),
   deliberately not shrunk further — scrolling past a tall image is the expected, normal
   interaction here, same as portrait, not something to engineer around. */
@media (max-height: 520px) and (pointer: coarse) {
  .title-row { padding: 6px 14px; gap: 4px; }
  .title-label { font-size: calc(16px * var(--scale-factor)); padding: 2px 8px; }
  .project-meta-panel { padding: 4px 14px; }
  .project-meta-detail { margin-top: 3px; padding-top: 3px; }
  .viewer-thumb { width: 44px; height: 44px; }

  /* A side-by-side image/text split (what the @container rule below normally switches to
     once the window is wide enough, which a fullscreen phone window always is) put two
     independently-scrolling columns on a screen this short — cluttered and cramped either
     way the width got split. Simpler and easier to use: force the same single-column,
     full-width, one-scroll layout portrait already uses, regardless of container width. */
  .project-window .window-content { overflow: auto; }
  .project-content { height: auto; min-height: 100%; }
  .project-layout { flex-direction: column; overflow: visible; }
  .project-layout.has-gallery .project-gallery-col {
    flex: none;
    overflow-y: visible;
    border-right: 0;
  }
  .project-layout.has-gallery .project-text-col,
  .project-layout:not(.has-gallery) .project-text-col {
    flex: none;
    overflow-y: visible;
  }
}

.project-description { margin: 16px 0; }
.project-description p { line-height: 1.6; margin-bottom: 11px; overflow-wrap: anywhere; }
.project-description p:last-child { margin-bottom: 0; }
.project-description .credit { font-size: var(--font-size-small); color: var(--accent-color); }
.project-description a { text-decoration: underline; cursor: pointer; }
.project-description a:hover { background: var(--selected-bg); color: var(--selected-text); }

.project-section-heading {
  margin: 4px 0 7px;
  padding-bottom: 4px;
  border-bottom: var(--window-border) solid var(--border-color);
  font-size: var(--font-size-normal);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-events-panel { margin-bottom: 16px; }
.project-events-panel > div { margin-bottom: 12px; }
.project-events-panel > div:last-child { margin-bottom: 0; }
.project-events-panel ul,
.project-publications ul { list-style: none; }
.project-events-panel li,
.project-publications li {
  padding: 4px 0;
  border-bottom: 1px solid var(--medium-grey);
  font-size: var(--font-size-small);
  line-height: 1.4;
}
.project-events-panel li:last-child,
.project-publications li:last-child { border-bottom: 0; }
.event-dates { color: var(--accent-color); white-space: nowrap; }

.project-support,
.project-collaborators,
.project-publications,
.project-audio-section { margin-bottom: 16px; }
.project-support p,
.project-collaborators p { font-size: var(--font-size-small); line-height: 1.5; }
.project-support a,
.project-collaborators a,
.project-events-panel a { text-decoration: underline; }
.project-support a:hover,
.project-collaborators a:hover,
.project-events-panel a:hover { background: var(--selected-bg); color: var(--selected-text); }
.project-musicplayer-button { margin-top: 4px; padding: 6px 14px; }

.project-video { margin-bottom: 16px; border: var(--window-border) solid var(--border-color); background: var(--black); }
.video-facade {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 3px),
    var(--black);
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.video-facade .play-glyph { font-size: 30px; line-height: 1; }
.video-facade small { font-weight: 400; opacity: 0.6; letter-spacing: 0.02em; }
.video-facade:hover .play-glyph { color: var(--medium-grey); }
.project-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }

@container project (max-width: 520px) {
  .project-nav .print-action { display: none; }
  .project-nav-counter { min-width: 0; }
  .title-row { padding: 10px 14px; }
  .project-meta-panel { padding: 9px 14px; }
  .project-text-col { padding: 14px 14px 26px; }
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.97);
  touch-action: pan-y;
  animation: windowIn 0.14s ease-out;
}
.lightbox-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 52px) calc(var(--safe-right) + 56px) 8px calc(var(--safe-left) + 56px);
}
.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px calc(var(--safe-right) + 16px) calc(var(--safe-bottom) + 12px) calc(var(--safe-left) + 16px);
  color: var(--white);
  font-size: var(--font-size-small);
  line-height: 1.4;
}
.lightbox-caption { display: none; }   
.lightbox-count { flex: 0 0 auto; margin-left: auto; font-weight: 700; opacity: 0.8; }

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-bg);
  border: var(--window-border) solid var(--border-color);
  font-weight: 700;
  line-height: 1;
}
.lightbox-close { top: calc(var(--safe-top) + 12px); right: calc(var(--safe-right) + 14px); width: 40px; height: 40px; font-size: 22px; }
.lightbox-prev,
.lightbox-next { top: 50%; width: 40px; height: 52px; margin-top: -30px; }
.lightbox-prev { left: calc(var(--safe-left) + 8px); }
.lightbox-next { right: calc(var(--safe-right) + 8px); }
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: var(--selected-bg); color: var(--selected-text); }
.lightbox-prev[disabled],
.lightbox-next[disabled] { opacity: 0.25; pointer-events: none; }
.lightbox-overlay.single .lightbox-prev,
.lightbox-overlay.single .lightbox-next { display: none; }

@media (max-width: 767px) {
  .lightbox-stage { padding: calc(var(--safe-top) + 56px) 0 8px; }
  .lightbox-prev, .lightbox-next { display: none; }   
}

.retro-music-player { display: flex; flex-direction: column; height: 100%; }
.album-list-panel { display: flex; flex-direction: column; flex: 0 0 auto; max-height: 176px; min-height: 100px; border-bottom: var(--window-border) solid var(--border-color); }
.album-list-header {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: var(--menubar-height);
  padding: 0 10px;
  background: var(--secondary-bg);
  border-bottom: var(--window-border) solid var(--border-color);
  font-size: var(--font-size-small);
  font-weight: 700;
  letter-spacing: 0.05em;
}
.album-list-scroll { flex: 1; overflow-y: auto; }
.album-list-row {
  display: flex;
  width: 100%;
  padding: 5px 10px;
  border-bottom: 1px solid var(--light-grey);
  font-size: var(--font-size-small);
  text-align: left;
}
.album-list-row:last-child { border-bottom: 0; }
.album-list-row:hover { background: var(--light-grey); }
.album-list-row.selected { background: var(--selected-bg); color: var(--selected-text); }
.album-list-col-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-list-col-year { flex: 0 0 44px; text-align: right; }
.now-playing-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  height: var(--menubar-height);
  padding: 0 10px;
  background: var(--secondary-bg);
  border-bottom: var(--window-border) solid var(--border-color);
  font-size: var(--font-size-small);
}
.now-playing-label { font-weight: 700; flex-shrink: 0; }
.now-playing-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-playing-description {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-bottom: var(--window-border) solid var(--border-color);
  font-size: var(--font-size-small);
  line-height: 1.4;
  color: var(--dark-grey);
}
.now-playing-description[hidden] { display: none; }
.compact-player { position: relative; flex: 1 1 auto; min-height: 200px; background: var(--tertiary-bg); }
#bandcamp-embed,
#bandcamp-embed iframe { width: 100%; height: 100%; border: 0; }
.player-message { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--tertiary-bg); }
.player-message[hidden] { display: none; }   
.message-text { font-size: var(--font-size-small); font-weight: 700; color: var(--accent-color); }
.player-message a { display: inline-block; margin-top: 12px; padding: 8px 16px; border: var(--window-border) solid var(--border-color); background: var(--primary-bg); text-decoration: none; font-weight: 700; }

.contact-form-wrap { display: flex; flex-direction: column; height: 100%; }
.contact-form-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 8px; }
.contact-intro { padding-bottom: 12px; border-bottom: 1px solid var(--border-color); }
.contact-intro p { line-height: 1.5; }
.contact-direct { margin-top: 6px; font-size: var(--font-size-large); }
.contact-direct a { text-decoration: underline; }
.contact-field-row { display: flex; align-items: baseline; gap: 10px; }
.contact-field-row--message { flex: 1; align-items: flex-start; min-height: 0; }
.contact-field-row label { flex: 0 0 66px; padding-top: 5px; font-size: var(--font-size-small); font-weight: 700; letter-spacing: 0.04em; }
.contact-input {
  flex: 1;
  min-width: 0;
  padding: 5px 7px;
  background: var(--primary-bg);
  border: var(--window-border) solid var(--border-color);
  border-radius: 0;
  outline: none;
  font-size: 16px;              
  -webkit-appearance: none;
  appearance: none;
}
.contact-input:focus { background: var(--secondary-bg); }
.contact-textarea { resize: none; height: 100%; min-height: 110px; line-height: 1.4; }
.contact-form-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: var(--secondary-bg);
  border-top: var(--window-border) solid var(--border-color);
}
.contact-status { flex: 1; font-size: var(--font-size-small); }
.contact-send-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  background: var(--selected-bg);
  color: var(--selected-text);
  border: var(--window-border) solid var(--border-color);
  font-size: var(--font-size-small);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.contact-send-btn:hover { background: var(--dark-grey); }
.contact-send-btn:disabled { opacity: 0.5; cursor: default; }
.contact-success { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; padding: 40px 20px; text-align: center; }
.contact-success-icon { font-size: 32px; font-weight: 700; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.insta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 16px;
  align-content: start;
  min-height: 100%;
}
.insta-embed { border: var(--window-border) solid var(--border-color); overflow: hidden; }
.insta-embed iframe { display: block; width: 100% !important; }

.insta-card {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 28px;
  text-align: center;
}
.insta-badge { position: relative; flex-shrink: 0; width: 60px; height: 60px; border: var(--window-border) solid var(--border-color); }
.insta-lens { position: absolute; inset: 14px; border: var(--window-border) solid var(--border-color); border-radius: 50%; }
.insta-badge::after { content: ''; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; background: var(--border-color); }
.insta-card h2 { font-size: var(--font-size-large); font-weight: 700; }
.insta-card p { max-width: 34ch; font-size: var(--font-size-small); line-height: 1.5; color: var(--accent-color); }
.insta-card code { font-size: var(--font-size-small); background: var(--secondary-bg); padding: 1px 4px; }

.empty-note { grid-column: 1 / -1; padding: 40px 16px; text-align: center; color: var(--accent-color); font-size: var(--font-size-small); }

.image-viewer { display: flex; align-items: center; justify-content: center; height: 100%; background: var(--secondary-bg); }
.image-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
