.photos-entry {
  padding: 6px 0 12px;
  border-bottom: 1px solid #e6e1d3;
}
.photos-entry h2 {
  font:
    600 15px/1.4 Montserrat,
    sans-serif;
  color: #2c2a29;
}
.photos-entry p {
  font-size: 11px;
  line-height: 1.6;
  color: #675d52;
  margin: 6px 0;
}
.photos-entry button {
  width: 100%;
  padding: 10px;
  background: #fff;
  border: 1px solid #d9cbbb;
  border-radius: 7px;
  color: #453a30;
  font-size: 12px;
}
.photos-entry button span {
  display: inline-block;
  min-width: 22px;
  margin-left: 4px;
  background: #f0e8dc;
  border-radius: 20px;
}
#photosDialog {
  width: min(900px, calc(100vw - 24px));
}
.photos-eyebrow {
  font-size: 10px !important;
  letter-spacing: 0.15em;
  color: #8c2d38;
  margin: 0 !important;
}
#photosDrop {
  border: 2px dashed #d1bca4;
  background: #f7f3ea;
  padding: 24px 16px;
  text-align: center;
  border-radius: 12px;
  margin: 20px 0;
}
#photosDrop.dragging {
  border-color: #8c2d38;
  background: #f4e3e3;
}
#photosDrop h3 {
  font:
    500 24px/1.3 "Playfair Display",
    serif;
}
#photosDrop small {
  display: block;
  margin-top: 12px;
  font-size: 11px;
  color: #665d52;
}
#photosGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 14px;
}
.photo-card {
  min-width: 0;
  background: #fff;
  border: 1px solid #e2d7c8;
  border-radius: 10px;
  padding: 10px;
}
.photo-card img {
  width: 100%;
  height: 145px;
  object-fit: contain;
  background: #f1eee8;
  border-radius: 5px;
}
.photo-card p {
  margin: 6px 0;
}
.photo-name {
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photo-dimensions {
  font-size: 11px;
  color: #74695e;
}
.photo-card button {
  width: 100%;
  margin-top: 5px;
  font-size: 12px;
}
.photo-card .photo-remove {
  background: transparent;
  color: #66564a;
  text-decoration: underline;
  padding: 5px;
}
.photos-privacy {
  font-size: 11px;
  line-height: 1.6;
  color: #695e53;
  border-top: 1px solid #e6e1d3;
  padding-top: 12px;
}
#photosErrors {
  color: #8c2d38;
  font-size: 12px;
  list-style: disc;
  padding-left: 20px;
}
#photosEmpty {
  color: #74695e;
  text-align: center;
}
#photosEmpty[hidden] {
  display: none;
}
@media (max-width: 700px) {
  .photos-entry p {
    display: none;
  }
  .photos-entry button {
    padding: 8px 3px;
    font-size: 10px;
  }
  .photos-entry h2 {
    font-size: 11px;
  }
  .photos-entry button span {
    margin: 0;
  }
  #photosDrop {
    padding: 16px 10px;
  }
  #photosGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .photo-card img {
    height: 115px;
  }
  .photo-card {
    padding: 7px;
  }
}

/* Keep the editor below mobile browser chrome and device cutouts. */
html,
body {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#editorShell {
  height: 100vh;
  min-height: 0 !important;
  overflow: hidden;
}

@supports (height: 100dvh) {
  #editorShell {
    height: 100dvh;
  }
}

#editorHeader {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
}

@supports (height: 100svh) {
  #editorShell {
    height: 100svh;
  }
}

@supports (height: 100dvh) {
  #editorShell {
    height: 100dvh;
  }
}

/* Compact laptop windows and browser zoom can make a desktop viewport behave
   like a narrow screen. Keep actions on a visible second row. */
@media (max-width: 1050px), (max-height: 720px) {
  #editorHeader {
    height: auto !important;
    min-height: 64px;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  #editorHeader > div:last-child {
    flex: 1 1 470px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  #editorHeader button {
    min-height: 36px;
  }

  #editorHeader #documentStatus {
    display: none;
  }
}

.project-bar {
  position: relative;
  z-index: 35;
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
}

@media (max-width: 700px) {
  #editorHeader {
    min-height: calc(64px + env(safe-area-inset-top, 0px));
    padding-top: max(8px, env(safe-area-inset-top, 0px)) !important;
    align-content: center;
  }

  #editorHeader .brand-copy p,
  #editorHeader #documentStatus {
    display: none;
  }

  #editorHeader img {
    width: auto;
    height: 32px;
    max-width: 128px;
  }

  #editorHeader > div:last-child {
    margin-left: auto;
    justify-content: flex-end;
  }

  #editorHeader button {
    min-height: 38px;
    padding: 7px 9px;
  }

  .project-bar {
    max-height: min(42dvh, 310px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 8px;
  }
}
