/* Client-facing type scale. Loaded after site.css on public pages only.
   Body/UI ~16px; uppercase labels 13px+ (no 7–9px tracking); headings larger.
   Lightbox chrome is included. Do not shrink photographs. */

.site-shell,
.gallery-page,
.access-denied,
.registration-page {
  font-size: 16px;
}

/* --- Home access --- */
.site-shell .brand strong {
  font-size: 14px;
  letter-spacing: 0.18em;
}

.site-shell .brand small {
  font-size: 11px;
  letter-spacing: 0.18em;
}

.site-shell nav {
  font-size: 13px;
  letter-spacing: 0.14em;
}

.site-shell .admin-link {
  font-size: 13px;
  padding: 12px 16px;
}

.site-shell .eyebrow {
  font-size: 13px;
  letter-spacing: 0.2em;
}

.site-shell h1 {
  font-size: clamp(48px, 5.6vw, 82px);
}

.intro {
  font-size: 18px;
  line-height: 1.7;
}

.gallery-access label {
  font: 13px/1.3 Arial, sans-serif;
  letter-spacing: 0.14em;
}

.access-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.access-row input {
  font-size: 16px;
  line-height: 1.4;
}

.access-row button {
  padding: 14px 20px;
  font: 700 13px/1.2 Arial, sans-serif;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.hero-copy .gallery-access + .gallery-access {
  margin-top: 18px;
}

.access-error {
  color: #e8b4b4 !important;
}

.access-notice {
  color: #d7b777 !important;
}

.registration-page .access-resend {
  margin-top: 12px;
}

.registration-page .access-resend button {
  width: 100%;
  border: 1px solid rgba(215, 183, 119, 0.4);
  background: transparent;
  color: #d7b777;
}

.client-hub {
  min-height: 100svh;
  background: #0b0a08;
  color: #f5f1e9;
}

.client-hub-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #f5f1e9;
}

.client-hub-header .brand,
.client-hub-header .gallery-tool {
  color: #f5f1e9;
  text-shadow: none;
}

.client-hub-email {
  color: #c8bfb2;
  font: 13px/1.3 Arial, sans-serif;
}

.client-hub-main {
  padding: 48px clamp(20px, 5vw, 72px) 80px;
}

.client-hub-main h1 {
  margin: 8px 0 12px;
  font-size: clamp(42px, 6vw, 72px);
}

.client-hub-lede {
  max-width: 640px;
  margin: 0 0 36px;
  color: #b8afa4;
  font: 17px/1.6 Georgia, serif;
}

.client-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.client-hub-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #13120f;
  color: inherit;
}

.client-hub-cover {
  height: 180px;
  background: linear-gradient(135deg, #30291f, #15130f) center / cover no-repeat;
}

.client-hub-copy {
  padding: 16px 18px 20px;
}

.client-hub-copy small {
  color: #d7b777;
  font: 11px/1.3 Arial, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.client-hub-copy h2 {
  margin: 8px 0 6px;
  font: 400 24px/1.2 Georgia, serif;
}

.client-hub-copy p {
  margin: 0;
  color: #8a8278;
  font: 14px/1.4 Arial, sans-serif;
}

@media (max-width: 1100px) {
  .client-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .client-hub-grid {
    grid-template-columns: 1fr;
  }
  .client-hub-header {
    flex-wrap: wrap;
    gap: 12px;
  }
}

.explore {
  font: 13px Arial, sans-serif;
  letter-spacing: 0.16em;
}

/* --- Access denied / email gate --- */
.access-denied .eyebrow,
.registration-page .eyebrow {
  font-size: 13px;
  letter-spacing: 0.2em;
}

.access-denied p:not(.eyebrow),
.registration-page > section > p:not(.eyebrow) {
  font-size: 17px;
  line-height: 1.6;
}

.access-denied a {
  font: 13px Arial, sans-serif;
  letter-spacing: 0.14em;
}

.registration-page .brand strong {
  font-size: 14px;
}

.registration-page .brand small {
  font-size: 11px;
}

.registration-page input {
  font-size: 16px;
}

.registration-page button {
  padding: 0 22px;
  font: 700 13px/1.2 Arial, sans-serif;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* --- Album chrome --- */
.gallery-header .brand strong {
  font-size: 14px;
  letter-spacing: 0.18em;
}

.gallery-header .brand small {
  font-size: 11px;
}

.gallery-header-nav .gallery-tool,
.gallery-tool {
  font: 13px/1.2 Arial, sans-serif;
  letter-spacing: 0.12em;
}

.section-lock-label {
  font: 14px/1.3 Arial, sans-serif;
  letter-spacing: 0.12em;
}

.gallery-cover .eyebrow {
  font-size: 13px;
  letter-spacing: 0.2em;
}

.gallery-cover h1 {
  font-size: clamp(52px, 8vw, 112px);
}

.gallery-cover p:last-child {
  font: 16px/1.45 Arial, sans-serif;
  letter-spacing: 0.1em;
}

.cover-scroll {
  font: 13px Arial, sans-serif;
  letter-spacing: 0.16em;
}

.gallery-hero {
  padding: 48px clamp(20px, 7vw, 100px) 12px;
  text-align: center;
}

.gallery-description {
  max-width: 680px;
  margin: 18px auto 0;
  color: #746d63;
  font: italic 18px/1.7 Georgia, serif;
}

.client-note {
  display: inline-block;
  margin: 22px auto 0;
  padding: 14px 20px;
  border: 1px solid #d8d0c4;
  color: #5b5248 !important;
  font: 16px/1.55 Georgia, serif !important;
  letter-spacing: 0;
}

.set-tabs button {
  font: 13px/1.2 Arial, sans-serif;
  letter-spacing: 0.12em;
}

.gallery-empty {
  font-size: 16px;
  line-height: 1.55;
}

.gallery-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 72px;
  padding: 56px 24px 64px;
  background: #0b0a08;
  color: #d7b777;
  text-align: center;
  font: 13px Arial, sans-serif;
  letter-spacing: 0.12em;
}

.gallery-footer-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  opacity: 0.94;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.gallery-footer-logo:hover,
.gallery-footer-logo:focus-visible {
  opacity: 1;
  filter: drop-shadow(0 0 12px rgba(215, 183, 119, 0.3));
  outline: none;
}

.gallery-footer-logo img {
  display: block;
  width: min(280px, 68vw);
  height: auto;
}

.gallery-footer-tagline {
  display: block;
  margin-top: 16px;
  color: #d7b777;
  font: 11px/1.3 Arial, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* --- Photo captions / download --- */
.photo-actions {
  font: 13px/1.3 Arial, sans-serif;
  letter-spacing: 0.08em;
  padding: 44px 14px 14px;
}

.photo-actions .photo-download,
.photo-actions a,
.photo-actions button {
  font: 13px/1.2 Arial, sans-serif;
  letter-spacing: 0.08em;
}

.download-pin {
  font: 13px Arial, sans-serif;
  letter-spacing: 0.1em;
}

.download-pin input {
  font-size: 16px;
}

.gallery-message {
  font: 15px/1.4 Arial, sans-serif;
}

/* --- Favorite tray --- */
.selection-tray span {
  font: 12px/1.3 Arial, sans-serif;
  letter-spacing: 0.1em;
}

.selection-tray input {
  font: 16px/1.3 Arial, sans-serif;
}

.selection-tray button:not(.icon-btn):not(.tray-thumb),
.selection-tray .tray-text-btn {
  padding: 12px 18px;
  font: 700 13px/1.2 Arial, sans-serif;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.selection-tray button.icon-btn,
.selection-tray button.tray-thumb {
  padding: 0;
  letter-spacing: 0;
  white-space: normal;
  font-size: 0;
}

.selection-tray strong {
  font-size: 28px;
}

/* --- Lightbox (all chrome text) --- */
.lightbox:has(.lightbox-chrome) {
  grid-template-columns: minmax(44px, 72px) 1fr minmax(44px, 72px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.lightbox-chrome {
  gap: 16px;
  padding: 10px 18px 8px;
}

.lightbox-count {
  font: 15px/1.3 Arial, sans-serif;
  letter-spacing: 0.12em;
  color: #f2eee7;
}

.lightbox-tools {
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.lightbox-tools .icon-btn svg {
  width: 20px;
  height: 20px;
}

.lightbox-nav.icon-btn {
  align-self: center;
  justify-self: center;
}

.lightbox-nav.icon-btn svg {
  width: 22px;
  height: 22px;
}

.lightbox-footer {
  grid-column: 1 / -1;
  grid-row: 3;
  display: grid;
  gap: 4px;
  padding: 8px 16px 14px;
  text-align: center;
}

.lightbox-caption {
  grid-column: auto;
  grid-row: auto;
  margin: 0;
  padding: 0;
  color: rgba(242, 238, 231, 0.9);
  font: 17px/1.45 Georgia, serif;
}

.lightbox-hint {
  margin: 0;
  color: rgba(242, 238, 231, 0.55);
  font: 13px/1.4 Arial, sans-serif;
  letter-spacing: 0.06em;
}

.pin-modal .eyebrow {
  font-size: 13px;
  letter-spacing: 0.18em;
}

.pin-modal h2 {
  font: 400 34px/1.15 Georgia, serif;
}

.pin-modal p:not(.eyebrow) {
  font: 16px/1.6 Georgia, serif;
}

.pin-modal input {
  font-size: 16px;
}

.edit-request-fields input {
  font-size: 16px;
  letter-spacing: 0.02em;
}

.edit-request-error {
  font: 14px/1.45 Arial, sans-serif !important;
}

.pin-actions button {
  font: 700 13px/1.2 Arial, sans-serif;
  letter-spacing: 0.08em;
}

@media (hover: none) {
  .gallery-tool {
    font-size: 13px;
  }
}

@media (max-width: 760px) {
  .site-shell .brand strong {
    font-size: 13px;
  }

  .site-shell .brand small {
    font-size: 10px;
  }

  .intro {
    font-size: 16px;
  }

  .gallery-access label,
  .access-row button,
  .gallery-access small,
  .registration-page button {
    letter-spacing: 0.06em;
  }

  .access-row button,
  .registration-page button {
    width: 100%;
    padding: 14px 16px;
    white-space: normal;
  }

  .gallery-cover h1 {
    font-size: clamp(40px, 12vw, 68px);
  }

  .gallery-cover p:last-child,
  .cover-scroll,
  .gallery-tool:not(.icon-btn),
  .gallery-header-nav .gallery-tool {
    font-size: 13px;
    letter-spacing: 0.06em;
  }

  .gallery-header-nav .gallery-tool {
    padding: 10px 8px;
  }

  .gallery-hero {
    padding: 8px 20px 0;
  }

  /* Description lede stays on desktop/tablet */
  .gallery-description {
    display: none;
  }

  .gallery-hero:not(:has(.client-note)) {
    display: none;
    padding: 0;
  }

  .client-note {
    font-size: 16px;
    padding: 12px 16px;
  }

  .set-tabs button {
    font-size: 13px;
    letter-spacing: 0.08em;
  }

  .photo-actions,
  .photo-actions .photo-download,
  .photo-actions a,
  .photo-actions button {
    font-size: 13px;
    letter-spacing: 0.06em;
  }

  .photo-actions {
    padding: 36px 10px 12px;
  }

  .selection-tray span {
    font-size: 12px;
  }

  .selection-tray input {
    font-size: 16px;
  }

  .selection-tray button:not(.icon-btn):not(.tray-thumb),
  .selection-tray .tray-text-btn {
    font-size: 13px;
    letter-spacing: 0.06em;
    white-space: normal;
    padding: 12px 14px;
  }

  .lightbox:has(.lightbox-chrome) {
    grid-template-columns: 44px 1fr 44px;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .lightbox-chrome {
    padding: 8px 10px;
    gap: 8px;
  }

  .lightbox-count {
    font-size: 13px;
    letter-spacing: 0.06em;
  }

  .lightbox-tools {
    gap: 6px;
  }

  .lightbox-tools .icon-btn,
  .lightbox-nav.icon-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .lightbox-caption {
    font-size: 16px;
  }

  .lightbox-hint {
    font-size: 12px;
    letter-spacing: 0.04em;
  }

  .lightbox-hint-wide {
    display: none;
  }
}

@media (min-width: 761px) {
  .lightbox-hint-narrow {
    display: none;
  }
}

/* Thin overlay-like horizontal scrollbar on the favorites thumb strip */
.selection-tray .tray-thumbs {
  scrollbar-width: thin;
  scrollbar-color: rgba(215, 183, 119, 0.55) transparent;
}

.selection-tray .tray-thumbs::-webkit-scrollbar {
  height: 5px;
}

.selection-tray .tray-thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.selection-tray .tray-thumbs::-webkit-scrollbar-thumb {
  background-color: rgba(215, 183, 119, 0.55);
  border: none;
  border-radius: 999px;
}

.selection-tray .tray-thumbs::-webkit-scrollbar-thumb:hover {
  background-color: rgba(215, 183, 119, 0.8);
}

.selection-tray .tray-thumbs::-webkit-scrollbar-corner {
  background: transparent;
}

/* Collections slide-out (second nav, right side) */
.collections-opener {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  flex-shrink: 0;
}

.collections-opener-icon {
  display: block;
  width: 22px;
  height: 22px;
}

.collections-opener[aria-expanded="true"] {
  color: #9f7741;
}

.collections-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 8, 6, 0.58);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s ease, visibility 0s linear 0.32s;
}

.collections-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.32s ease, visibility 0s;
}

.collections-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 81;
  display: flex;
  flex-direction: column;
  width: min(400px, 80vw);
  height: 100%;
  height: 100svh;
  padding: 28px 24px 32px;
  border-left: 1px solid rgba(212, 181, 120, 0.28);
  background: #11100d;
  color: #f5f1e9;
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.32s ease, visibility 0s linear 0.32s;
}

.collections-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.32s ease, visibility 0s;
}

.collections-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.collections-drawer-head h2 {
  margin: 0;
  color: #e2c78f;
  font: 400 22px/1.2 Georgia, serif;
  letter-spacing: 0.04em;
}

.collections-drawer-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d8bb86;
  font: 200 32px/1 Arial, sans-serif;
}

.collections-drawer-close:hover,
.collections-drawer-close:focus-visible {
  color: #f5f1e9;
}

.collections-nav {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.collections-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 16px 4px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: none;
  color: #f5f1e9;
  font: 16px/1.45 Georgia, serif;
  text-align: left;
}

.collections-item:hover,
.collections-item:focus-visible {
  color: #e2c78f;
}

.collections-item.is-active {
  color: #e2c78f;
}

.collections-item-name {
  min-width: 0;
}

.collections-item-count {
  flex-shrink: 0;
  color: #c6a96f;
  font: 13px/1.2 Arial, sans-serif;
  letter-spacing: 0.08em;
}

.collections-row {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.collections-row .collections-item {
  border-bottom: 0;
  flex: 1;
  min-width: 0;
}

.collections-row .collections-select-all {
  flex: 0 0 40px;
  color: #d7b777;
}

.collections-row .collections-select-all:hover,
.collections-row .collections-select-all:focus-visible {
  color: #f5f1e9;
}

@media (prefers-reduced-motion: reduce) {
  .collections-backdrop,
  .collections-backdrop.is-open,
  .collections-drawer,
  .collections-drawer.is-open {
    transition: none;
  }
}

.photo-set {
  scroll-margin-top: 72px;
  padding: 8px 0 20px;
}

.photo-set-heading {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  margin: 0 var(--gallery-inset, 48px) 32px;
  color: #17140f;
  font: 400 28px/1.2 Georgia, serif;
}

.photo-set-heading-cluster {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  max-width: 100%;
}

.photo-set-heading-toggle {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.photo-set-heading-text {
  display: block;
  min-width: 0;
}

.photo-set-heading-text small {
  display: block;
  margin-top: 6px;
  color: #8b6c3f;
  font: 13px/1.3 Arial, sans-serif;
  letter-spacing: 0.12em;
}

.photo-set-heading-actions {
  position: absolute;
  left: 100%;
  top: 0.2em;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2px;
  padding-left: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-12px);
  pointer-events: none;
  white-space: nowrap;
  transition: transform 0.2s ease, opacity 0.18s ease, visibility 0.18s ease;
}

.photo-set-heading-cluster.is-open .photo-set-heading-actions {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
  .photo-set-heading-cluster:hover .photo-set-heading-actions,
  .photo-set-heading-cluster:focus-within .photo-set-heading-actions {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
  }
}

.photo-set-heading-action {
  flex-shrink: 0;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 0;
  background: none;
  color: #8b6c3f;
  font: 13px/1.2 Arial, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.photo-set-heading-action:hover,
.photo-set-heading-action:focus-visible {
  color: #9f7741;
}

@media (prefers-reduced-motion: reduce) {
  .photo-set-heading-actions {
    transform: none;
    transition: none;
  }

  .photo-set-heading-cluster.is-open .photo-set-heading-actions {
    transform: none;
  }

  @media (hover: hover) and (pointer: fine) {
    .photo-set-heading-cluster:hover .photo-set-heading-actions,
    .photo-set-heading-cluster:focus-within .photo-set-heading-actions {
      transform: none;
    }
  }
}

#collection {
  scroll-margin-top: 0;
}

.gallery-subnav {
  position: sticky;
  top: 0;
  z-index: 20;
}

.gallery-subnav-count {
  font: 13px/1.3 Arial, sans-serif;
  letter-spacing: 0.1em;
  color: #5c5349;
}

@media (max-width: 760px) {
  .gallery-subnav-count {
    font-size: 13px;
    letter-spacing: 0.08em;
  }

  .photo-set-heading {
    margin-bottom: 24px;
  }
}

/* Logged download context menu — photo surfaces only */
.photo-open,
.lightbox-image,
.tray-thumb {
  -webkit-touch-callout: none;
  user-select: none;
}

.photo-card img,
.lightbox-image img,
.tray-thumb img {
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

/* Fit the full photograph in the viewport. Grid thumbs keep object-fit: cover.
   Flex (not grid) so .photo-protect does not create a second track and crop the photo. */
.lightbox-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  justify-self: stretch;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  background: #000;
}

.lightbox-image.is-loading img,
.lightbox-image img.is-loading {
  opacity: 0;
}

.lightbox-image.is-loading::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 2px solid rgba(242, 238, 231, 0.22);
  border-top-color: rgba(242, 238, 231, 0.92);
  border-radius: 50%;
  pointer-events: none;
  animation: lightbox-spin 0.7s linear infinite;
}

@keyframes lightbox-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-image.is-loading::after {
    animation: none;
    border-color: rgba(242, 238, 231, 0.28);
    background: rgba(242, 238, 231, 0.28);
  }
}

.lightbox-image img {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 0;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(100%, calc(100svh - 9rem));
  object-fit: contain;
  object-position: center;
}

.photo-protect {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
}

.tray-thumb {
  position: relative;
}

.photo-context-menu {
  position: fixed;
  z-index: 400;
  min-width: 196px;
  padding: 6px;
  border: 1px solid rgba(215, 183, 119, 0.42);
  background: rgba(17, 15, 12, 0.97);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  color: #f2eee7;
}

.photo-context-menu[hidden] {
  display: none !important;
}

.photo-context-menu .photo-context-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 11px 14px;
  border: 0;
  background: transparent;
  color: #f2eee7;
  font: 700 12px/1.2 Arial, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}

.photo-context-menu .photo-context-item:hover,
.photo-context-menu .photo-context-item:focus-visible {
  background: rgba(215, 183, 119, 0.14);
  color: #d7b777;
  outline: none;
}

.photo-context-menu .photo-context-item[aria-disabled="true"] {
  color: #8a8379;
  cursor: not-allowed;
}

.play-interval-menu .photo-context-item.is-current {
  color: #d7b777;
}

[data-lightbox-play] {
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.photo-context-menu .photo-context-sep {
  height: 1px;
  margin: 4px 8px;
  background: rgba(215, 183, 119, 0.28);
}

/* Phone landscape lightbox: fill the short viewport. Desktop monitors stay unchanged
   (max-height 520px plus body.phone-landscape from matchMedia / orientation). */
@media (orientation: landscape) and (max-height: 520px) {
  .lightbox:has(.lightbox-chrome) {
    grid-template-columns: 36px 1fr 36px;
    grid-template-rows: 0 minmax(0, 1fr) 0;
  }

  .lightbox-chrome {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 4px 8px;
    background: linear-gradient(rgba(0, 0, 0, 0.55), transparent);
  }

  .lightbox-footer {
    display: none;
  }

  .lightbox-image {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .lightbox-nav {
    z-index: 4;
  }

  .lightbox-tools .icon-btn,
  .lightbox-nav.icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .lightbox-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
  }
}

body.phone-landscape .lightbox:has(.lightbox-chrome) {
  grid-template-columns: 36px 1fr 36px;
  grid-template-rows: 0 minmax(0, 1fr) 0;
}

body.phone-landscape .lightbox-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 4px 8px;
  background: linear-gradient(rgba(0, 0, 0, 0.55), transparent);
}

body.phone-landscape .lightbox-footer {
  display: none;
}

body.phone-landscape .lightbox-image {
  grid-column: 1 / -1;
  grid-row: 2;
}

body.phone-landscape .lightbox-nav {
  z-index: 4;
}

body.phone-landscape .lightbox-tools .icon-btn,
body.phone-landscape .lightbox-nav.icon-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
}

body.phone-landscape .lightbox-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 760px) {
  aside.selection-tray.visible {
    padding-top: 28px;
  }

  aside.selection-tray .tray-close,
  aside.selection-tray [data-tray-close] {
    position: absolute;
    top: 4px;
    right: 6px;
    z-index: 3;
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
  }

  aside.selection-tray .tray-close svg,
  aside.selection-tray [data-tray-close] svg {
    width: 14px;
    height: 14px;
  }
}
