/* The gallery editor (gallery-project.html), in the same look as the
   Workspace. Quiet buttons, the sidebar highlight and the status label
   come from css/gallery-list.css; this file adds the editor's own parts.
   Only the gallery editor uses this file. */

/* Top bar: the way back to Galleries, and the tabs (they scroll sideways
   when they do not fit). */
.gallery-editor-page .content-crumb a { color: var(--muted); text-decoration: none; }
.gallery-editor-page .content-crumb a:hover { color: var(--ink); }
.gallery-editor-page .editor-tabs { overflow-x: auto; scrollbar-width: none; }
@media (min-width: 901px) {
  .gallery-editor-page .editor-tabs { flex: 0 1 auto; min-width: 0; gap: 22px; }
}
.gallery-editor-page .editor-tabs::-webkit-scrollbar { display: none; }
.gallery-editor-page .content-tabs button {
  min-height: 48px;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
}
.gallery-editor-page .content-tabs button:hover { color: var(--ink); background: none; border-color: transparent; }
.gallery-editor-page .content-tabs button[aria-current="page"] { border-bottom-color: var(--ink); color: var(--ink); font-weight: 500; }

.editor-saved { color: var(--muted); font-size: 14px; }

/* Publish: one quiet row under the name. */
.editor-publish {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(159, 92, 53, .14);
  border-radius: 18px;
  background: rgba(255, 252, 246, .78);
}
.editor-publish p { flex: 1 1 260px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.editor-publish__expiry { display: block; margin-top: 3px; color: var(--ink); }
.editor-publish__expiry--warning { color: #9f5c35; }
.gallery-editor-page .editor-publish__extend { min-height: 0; margin-left: 8px; padding: 2px 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.gallery-editor-page .editor-publish__extend:hover { border-color: transparent; background: none; }
.gallery-editor-page .editor-publish__extend:disabled { opacity: .5; cursor: wait; }
.editor-publish__plan-note { display: block; margin-top: 2px; color: var(--muted, #7a7266); font-size: .92em; }
.editor-publish__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-editor-page .editor-publish__main { border-color: var(--ink); font-weight: 500; }
.gallery-editor-page .editor-publish__main:hover { background: rgba(42, 31, 22, .06); }
.gallery-editor-page [hidden] { display: none !important; }

/* A tab holds one or more parts, each in its own white card. */
.editor-tab { display: grid; gap: 16px; }

/* Each part of the gallery: one white card. */
.editor-panel {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid rgba(159, 92, 53, .14);
  border-radius: 18px;
  background: rgba(255, 252, 246, .78);
}
.editor-panel h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.15;
}
.editor-panel h3 { margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 500; }
.gallery-editor-page .hint { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.gallery-editor-page ul.hint { padding-left: 18px; }
.gallery-editor-page .eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Fields: normal labels, calm boxes. */
.gallery-editor-page .editor-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.gallery-editor-page .editor-form input,
.gallery-editor-page .editor-form select,
.gallery-editor-page .editor-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(42, 31, 22, .18);
  border-radius: var(--radius-field);
  background: rgba(255, 255, 255, .6);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  box-shadow: none;
}
.gallery-editor-page .editor-form textarea { line-height: 1.5; }
.gallery-editor-page .editor-form input:focus,
.gallery-editor-page .editor-form select:focus,
.gallery-editor-page .editor-form textarea:focus { border-color: var(--ink); box-shadow: none; }
.gallery-editor-page .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gallery-editor-page .full { grid-column: 1 / -1; }
.gallery-editor-page .film-picker { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.gallery-editor-page .film-picker[disabled] { opacity: .45; }
.gallery-editor-page .film-picker legend { margin-bottom: 8px; }
.gallery-editor-page .film-picker__preview { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #2a231d center / cover no-repeat; color: #fffaf2; }
.gallery-editor-page .film-picker__preview::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.45)); }
.gallery-editor-page .film-picker__preview span { position: relative; display: grid; place-items: center; width: 56px; height: 56px; padding-left: 4px; border: 1px solid rgba(255,250,242,.8); border-radius: 50%; background: rgba(0,0,0,.28); }
.gallery-editor-page .film-picker__preview strong { position: absolute; left: 14px; bottom: 12px; font-family: var(--serif, Georgia, serif); font-weight: 400; font-size: 18px; }
.gallery-editor-page .film-picker__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; }
.gallery-editor-page .film-thumb { position: relative; display: grid; gap: 4px; min-width: 0; cursor: pointer; font-size: 12px; }
/* The radio stays for keyboards and screen readers but takes no space (a general
   "inputs are 100% wide" rule made it stick out past the screen on phones). */
.gallery-editor-page .film-thumb input { position: absolute; top: 0; left: 0; width: 1px !important; height: 1px; min-width: 0; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.gallery-editor-page .film-thumb__img { aspect-ratio: 4 / 3; border: 2px solid transparent; border-radius: 8px; background: #e9e1d6 center / cover no-repeat; }
.gallery-editor-page .film-thumb.is-chosen .film-thumb__img { border-color: var(--ink, #1c1612); }
.gallery-editor-page .film-thumb input:focus-visible + .film-thumb__img { outline: 2px solid var(--ink, #1c1612); outline-offset: 2px; }
.gallery-editor-page .gallery-field-note { margin: -4px 0 0; color: var(--muted, #6f645b); font-size: 13px; line-height: 1.5; }
.gallery-editor-page .gallery-field-note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.gallery-editor-page .inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* "Add photos" is a label that opens the file chooser: it looks like the
   other quiet buttons. */
.gallery-editor-page .editor-form label.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
  cursor: pointer;
}
.gallery-editor-page .editor-form label.button::before { display: none; }
.gallery-editor-page .editor-form label.button:hover { background: rgba(42, 31, 22, .06); transform: none; }

/* Design: theme choices as small cards; the chosen one has a dark outline. */
/* min 260px: room for the mini preview (124px) + the words beside it. Cards fill their
   column (the shared "button fits its text" rule made them narrow, so words spilled out). */
.gallery-editor-page .theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.gallery-editor-page .theme-card {
  display: grid;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  box-sizing: border-box;
  justify-content: stretch;
  align-content: start;
  gap: 8px;
  min-height: 0;
  height: auto;
  padding: 14px;
  border-radius: 12px;
  text-align: left;
  white-space: normal;
}
.gallery-editor-page .theme-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.gallery-editor-page .theme-card[aria-pressed="true"] { border-color: var(--ink); background: rgba(42, 31, 22, .05); box-shadow: 0 0 0 1px var(--ink); }
.gallery-editor-page .theme-card__name { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; }
.gallery-editor-page .theme-card__name h3 { margin: 0; }
.gallery-editor-page .theme-card__check { flex: none; font-size: 12px; letter-spacing: .04em; color: var(--ink); }
/* Mini preview: the gallery's own cover + 3 photos in the theme's colors and corners. */
.gallery-editor-page .theme-card:has(.theme-preview) { grid-template-columns: 124px minmax(0, 1fr); column-gap: 14px; align-items: start; }
.gallery-editor-page .theme-card:has(.theme-preview) > .theme-preview { grid-row: 1 / span 3; }
.gallery-editor-page .theme-card__layout { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.gallery-editor-page .theme-card:has(.theme-preview) > p { font-size: 13px; }
.gallery-editor-page .theme-preview { display: grid; grid-template-columns: minmax(0, 1fr); width: 124px; min-width: 0; box-sizing: border-box; gap: 4px; padding: 6px; border-radius: 10px; background: var(--tp-bg); color: var(--tp-text); box-shadow: inset 0 0 0 1px rgba(42, 31, 22, .1); }
.gallery-editor-page .theme-preview__cover { display: block; aspect-ratio: 16 / 9; border-radius: var(--tp-radius); background: var(--tp-surface) center / cover no-repeat; }
.gallery-editor-page .theme-preview__title { overflow: hidden; font-family: var(--serif, Georgia, serif); font-size: 11px; line-height: 1.2; white-space: nowrap; text-overflow: ellipsis; }
.gallery-editor-page .theme-preview__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; min-width: 0; }
.gallery-editor-page .theme-preview__tiles span { display: block; min-width: 0; aspect-ratio: 1; border-radius: calc(var(--tp-radius) / 2); background: var(--tp-surface) center / cover no-repeat; }
/* The mini tiles take the shape of the theme's layout. */
.gallery-editor-page .theme-preview[data-layout="editorial"] .theme-preview__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-editor-page .theme-preview[data-layout="editorial"] .theme-preview__tiles span { aspect-ratio: 4 / 3; }
.gallery-editor-page .theme-preview[data-layout="editorial"] .theme-preview__tiles span:nth-child(3) { grid-column: 1 / -1; aspect-ratio: 16 / 7; }
.gallery-editor-page .theme-preview[data-layout="editorial"] .theme-preview__tiles span:nth-child(4) { display: none; }
.gallery-editor-page .theme-preview[data-layout="masonry"] .theme-preview__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.gallery-editor-page .theme-preview[data-layout="masonry"] .theme-preview__tiles span:nth-child(1), .gallery-editor-page .theme-preview[data-layout="masonry"] .theme-preview__tiles span:nth-child(4) { aspect-ratio: 3 / 4; }
.gallery-editor-page .theme-preview[data-layout="masonry"] .theme-preview__tiles span:nth-child(2), .gallery-editor-page .theme-preview[data-layout="masonry"] .theme-preview__tiles span:nth-child(3) { aspect-ratio: 4 / 3; }
.gallery-editor-page .theme-preview[data-layout="filmstrip"] .theme-preview__tiles { display: flex; overflow: hidden; gap: 3px; }
.gallery-editor-page .theme-preview[data-layout="filmstrip"] .theme-preview__tiles span { flex: 0 0 46%; aspect-ratio: 4 / 3; }
.gallery-editor-page .theme-preview[data-layout="grid"] .theme-preview__tiles span:nth-child(4) { display: none; }
.gallery-editor-page .palette { display: flex; gap: 6px; }
.gallery-editor-page .palette span { width: 22px; height: 22px; border: 1px solid rgba(42, 31, 22, .14); border-radius: 50%; }

/* Cover: a phone-sized view of the couple's chosen style and crop. */
.gallery-editor-page .project-cover { position: relative; width: 100%; max-width: 260px; aspect-ratio: 9 / 16; margin-inline: auto; overflow: hidden; border-radius: 12px; background: var(--preview-bg); color: var(--preview-text); }
.gallery-editor-page .project-cover__photo { position: absolute; overflow: hidden; background-size: cover; background-position: center; }
.gallery-editor-page .project-cover__photo .petal-canvas { position: absolute; inset: 0; pointer-events: none; }
.gallery-editor-page .project-cover__copy { position: absolute; left: 8%; right: 8%; z-index: 1; text-align: center; }
.gallery-editor-page .project-cover__eyebrow { display: block; margin-bottom: 8px; font-size: 7px; letter-spacing: .12em; text-transform: uppercase; }
.gallery-editor-page .project-cover__copy strong { display: block; font-family: var(--serif); font-size: 24px; font-weight: 400; line-height: 1; overflow-wrap: anywhere; }
.gallery-editor-page .project-cover--fullscreen .project-cover__photo { inset: 0; }
.gallery-editor-page .project-cover--fullscreen::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.62)); pointer-events: none; }
.gallery-editor-page .project-cover--fullscreen .project-cover__copy { bottom: 10%; color: #fffaf2; }
.gallery-editor-page .project-cover--framed .project-cover__photo { top: 8px; left: 8px; right: 8px; height: 68%; }
.gallery-editor-page .project-cover--framed .project-cover__photo::after { content: ""; position: absolute; inset: 5px; border: 1px solid color-mix(in srgb, var(--preview-accent) 45%, transparent); pointer-events: none; }
.gallery-editor-page .project-cover--framed .project-cover__copy { top: calc(68% + 22px); }
.gallery-editor-page .project-cover--framed .project-cover__copy strong { font-size: 19px; }
/* Oct 25: the cover sits inside the device preview (css/device-preview.css):
   the screen decides the size, so the box just fills it. */
.gallery-editor-page .device-preview .project-cover { position: absolute; inset: 0; width: auto; max-width: none; aspect-ratio: auto; margin: 0; border-radius: 0; }
.gallery-editor-page .project-cover--phone .project-cover__copy strong { font-size: 9cqi; }
.gallery-editor-page .project-cover--phone .project-cover__eyebrow { font-size: 3.6cqi; margin-bottom: 4px; }
.gallery-editor-page .project-cover--phone.project-cover--framed .project-cover__photo { top: 4px; left: 4px; right: 4px; }
.gallery-editor-page .project-cover--phone.project-cover--framed .project-cover__copy { top: calc(68% + 10px); }
.gallery-editor-page .project-cover--phone.project-cover--framed .project-cover__copy strong { font-size: 7.5cqi; }
/* Computer: words bottom-left like the real cover; framed = photo box, words below. */
.gallery-editor-page .project-cover--computer.project-cover--fullscreen .project-cover__copy { left: 6%; right: 40%; bottom: 9%; text-align: left; }
.gallery-editor-page .project-cover--computer .project-cover__copy strong { font-size: 4.2cqi; }
.gallery-editor-page .project-cover--computer .project-cover__eyebrow { font-size: 1.3cqi; margin-bottom: 1.4cqi; }
.gallery-editor-page .project-cover--computer.project-cover--framed .project-cover__photo { top: 5%; left: 4%; right: 4%; height: 74%; }
.gallery-editor-page .project-cover--computer.project-cover--framed .project-cover__copy { top: calc(79% + 4px); }
.gallery-editor-page .project-cover--computer.project-cover--framed .project-cover__copy strong { font-size: 3cqi; }
/* Drag the cover photo to place the subject (Oct 25). */
.gallery-editor-page [data-cover-drag] { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.gallery-editor-page [data-cover-drag].is-dragging { cursor: grabbing; }
.gallery-editor-page .cover-drag-hint { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 12px auto 0; color: var(--muted); font-size: 13px; }
.gallery-editor-page .cover-drag-reset { padding: 4px 10px; border: 1px solid var(--line, rgba(42, 31, 22, .18)); border-radius: var(--radius-button, 8px); background: transparent; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.gallery-editor-page .cover-portrait-note { margin: 10px auto 0; max-width: 560px; }

/* Sections: one short row each, in a single column. Tapping a row opens
   its Title, Subtitle and Description; Hide and Remove sit behind "⋯". */
.gallery-editor-page .section-list {
  display: grid;
  border: 1px solid rgba(42, 31, 22, .12);
  border-radius: 12px;
  /* minmax(0, 1fr): rows never grow wider than the card, so "⋯" stays on
     screen with a large phone font size (it was pushed out and clipped). */
  grid-template-columns: minmax(0, 1fr);
  background: rgba(255, 255, 255, .45);
  overflow: hidden;
}
.gallery-editor-page .section-row + .section-row { border-top: 1px solid rgba(42, 31, 22, .1); }
.gallery-editor-page .section-row[data-open="true"] { background: rgba(255, 255, 255, .6); }
.gallery-editor-page .section-row__head { display: flex; align-items: center; gap: 2px; padding: 4px 6px 4px 0; }
.gallery-editor-page .section-row__name {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap; /* on a narrow screen "2 photos · Hidden" drops under the name */
  gap: 0 10px;
  padding: 6px 8px 6px 16px;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: left;
}
.gallery-editor-page .section-row__name:hover { background: none; border-color: transparent; }
.gallery-editor-page .section-row__title { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.gallery-editor-page .section-row__meta { flex: 0 0 auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.gallery-editor-page .section-row__icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}
.gallery-editor-page .section-row__icon:hover:not(:disabled),
.gallery-editor-page .section-row__icon[aria-expanded="true"] { background: rgba(42, 31, 22, .07); border-color: transparent; }
.gallery-editor-page .section-row__icon:disabled { opacity: .28; }
.gallery-editor-page .section-row__menu { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 0 12px 12px; }
.gallery-editor-page .section-row__menu button { min-height: 36px; padding: 0 14px; font-size: 14px; }
.gallery-editor-page .section-row__remove { color: #9b3948; }
.gallery-editor-page .section-row__edit { display: grid; gap: 10px; padding: 4px 16px 16px; }
.gallery-editor-page .section-row__edit input,
.gallery-editor-page .section-row__edit textarea { min-width: 0; width: 100%; }
.gallery-editor-page .section-list + .inline-actions { margin-top: 12px; }

/* Photos: heading with "Add photos" beside it. */
.photos-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; }
.photos-head > div { display: grid; gap: 4px; }

/* Section filter: small pills that scroll sideways on a phone. */
.photo-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 2px; }
.photo-chips::-webkit-scrollbar { display: none; }
.favorites-tools { display: grid; gap: 6px; justify-items: start; margin: 4px 0 2px; }
.favorites-tools .hint { margin: 0; }
.gallery-editor-page .photo-chip {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(42, 31, 22, .18);
  border-radius: var(--radius-button);
  font-size: 13px;
}
.gallery-editor-page .photo-chip span { color: var(--muted); }
.gallery-editor-page .photo-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fdf8f1; }
.gallery-editor-page .photo-chip[aria-pressed="true"] span { color: rgba(253, 248, 241, .7); }
.gallery-editor-page .photo-chip[aria-pressed="true"]:hover { background: var(--ink); }

/* The collage: columns of photos, each photo in its own shape. */
.collage { display: flex; align-items: flex-start; gap: 4px; }
.collage-column { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gallery-editor-page .collage-tile {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  height: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: rgba(23, 17, 13, .07);
  cursor: zoom-in;
}
.gallery-editor-page .collage-tile:hover { background: rgba(23, 17, 13, .07); }
.gallery-editor-page .collage-tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Arrange (Oct 25, Jay): a photo grid read left to right. Drag (mouse) or press,
   hold and drag (touch); ‹ › move one place. */
.arrange-section { margin-top: 22px; }
.arrange-section h3 { margin: 0 0 10px; font-size: 16px; font-weight: 500; }
.arrange-section h3 span { color: var(--muted); font-size: 13px; font-weight: 400; }
.arrange-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 1100px) { .arrange-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .arrange-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; } }
.arrange-tile {
  position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: #e9e1d6;
  cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: pan-y; transition: opacity .15s ease, box-shadow .15s ease;
}
.arrange-tile img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.arrange-tile[data-hidden="true"] img { opacity: .42; }
.arrange-tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.arrange-tile.is-dragging { opacity: .25; box-shadow: inset 0 0 0 2px var(--ink); }
.arrange-tile__num {
  position: absolute; top: 6px; left: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: rgba(23, 17, 13, .72); color: #fffdf9; font-size: 11px; line-height: 22px; text-align: center;
}
.arrange-tile__hidden {
  position: absolute; top: 6px; right: 6px; padding: 2px 7px; border-radius: 999px;
  background: rgba(255, 253, 249, .9); color: var(--ink); font-size: 10px; line-height: 18px;
}
.arrange-tile__moves { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; pointer-events: none; }
.gallery-editor-page .arrange-tile__moves button {
  pointer-events: auto; width: 44px; height: 40px; min-height: 0; padding: 0; border: 0; border-radius: 0;
  background: transparent; color: #fffdf9; font-size: 20px; line-height: 1; cursor: pointer;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .65);
}
.gallery-editor-page .arrange-tile__moves button:disabled { opacity: 0; cursor: default; pointer-events: none; }
.gallery-editor-page .arrange-tile__moves button:focus-visible { outline: 2px solid #fffdf9; outline-offset: -4px; }
.arrange-ghost {
  position: fixed; top: 0; left: 0; z-index: 1000; margin: 0; pointer-events: none; cursor: grabbing;
  box-shadow: 0 18px 40px rgba(23, 17, 13, .35); border-radius: 8px; transition: none;
}
body.arrange-dragging, body.arrange-dragging * { cursor: grabbing !important; }
@media (hover: hover) {
  .gallery-editor-page .arrange-tile__moves button { opacity: 0; transition: opacity .15s ease; }
  .arrange-tile:hover .arrange-tile__moves button:not(:disabled),
  .arrange-tile:focus-within .arrange-tile__moves button:not(:disabled) { opacity: 1; }
}
.collage-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s var(--ease); }
.collage-tile:hover img { transform: scale(1.02); }
.collage-tile[data-hidden="true"] img { opacity: .42; }
.collage-tile__favorite,
.collage-tile__star {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(253, 248, 241, .92);
  color: var(--ink);
}
.collage-tile__favorite { left: auto; right: 6px; color: #9b3948; }
.collage-tile__hidden {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(23, 17, 13, .78);
  color: #fdf8f1;
  font-size: 11px;
}
.collage-empty { padding: 18px 0; }

/* Select many: "Select" beside "Add photos"; while selecting, the head
   shows the count, and each photo has a ring (not chosen) or a dark
   check (chosen). The bar at the bottom stays in view while scrolling. */
.photos-head > .photos-head__actions { display: flex; align-items: center; gap: 8px; }
.gallery-editor-page .photos-head__actions label.button { flex: 0 0 auto; width: auto; white-space: nowrap; }
.gallery-editor-page .photos-head__actions button { min-height: 40px; padding: 0 14px; font-size: 14px; }
.photos-head--select { align-items: center; }
.photos-select-count { margin: 0; font-size: 16px; font-weight: 500; }
.gallery-editor-page .photos-text-button,
.gallery-editor-page .photos-head__actions .photos-text-button {
  padding: 0 8px;
  border-color: transparent;
  background: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gallery-editor-page .photos-text-button:hover { border-color: transparent; background: none; color: var(--muted); }
.collage[data-selecting="true"] .collage-tile { cursor: pointer; }
.collage[data-selecting="true"] .collage-tile:hover img { transform: none; }
.collage-tile[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: -3px; }
.collage-tile[aria-pressed="true"] img { opacity: .78; }
.collage-tile__check {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  box-sizing: border-box;
  border: 1.5px solid #fdf8f1;
  border-radius: 50%;
  background: rgba(23, 17, 13, .2);
  color: #fdf8f1;
}
.collage-tile__check svg { visibility: hidden; }
.collage-tile[aria-pressed="true"] .collage-tile__check { border-color: var(--ink); background: var(--ink); }
.collage-tile[aria-pressed="true"] .collage-tile__check svg { visibility: visible; }
.select-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 0 calc(clamp(16px, 3vw, 24px) * -1) calc(clamp(16px, 3vw, 24px) * -1);
  padding: 12px clamp(16px, 3vw, 24px) 16px;
  border-top: 1px solid rgba(42, 31, 22, .12);
  border-radius: 0 0 18px 18px;
  background: #fdf8f1;
}
.select-bar__actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 640px; }
@media (max-width: 520px) { .select-bar__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gallery-editor-page .select-bar button { min-height: 48px; padding: 0 12px; font-size: 14px; }
.gallery-editor-page .select-bar button:disabled { opacity: .45; cursor: default; }
.gallery-editor-page .select-bar .select-bar__remove { border-color: rgba(143, 63, 34, .4); color: #8f3f22; }
.gallery-editor-page .select-bar .photos-text-button { min-height: 40px; }
.select-bar__move { display: grid; gap: 10px; }
.select-bar__move p { margin: 0; color: var(--muted); font-size: 14px; }
.select-bar__sections { display: flex; flex-wrap: wrap; gap: 8px; }
.select-bar__move .photos-text-button { justify-self: start; }

/* Full view of one photo (js/gallery-photo-viewer.js): a dark screen,
   the photo uncut in its own shape, and quiet controls. */
.photo-viewer-open, .photo-viewer-open body { overflow: hidden; }
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #120d0a;
  color: #fdf8f1;
  font-family: "Jost", var(--sans);
}
.photo-viewer[hidden] { display: none; }
.photo-viewer button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.photo-viewer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: max(6px, env(safe-area-inset-top)) 8px 0;
}
.photo-viewer__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: none;
}
.photo-viewer__icon:hover { background: rgba(253, 248, 241, .08); }
.photo-viewer__mark:hover { background: none; }
.photo-viewer__count { color: #d8cbbb; font-size: 14px; }
.photo-viewer__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Each photo's space on the swipe strip (js/swipe-track.js). */
  --swipe-pad: 0 8px;
}
.photo-viewer__stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; border-radius: 2px; user-select: none; }
.photo-viewer__nav {
  position: absolute;
  z-index: 1; /* above the swipe strip */
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(18, 13, 10, .55);
  transform: translateY(-50%);
}
.photo-viewer__nav:hover { background: rgba(18, 13, 10, .8); }
.photo-viewer__nav--prev { left: 10px; }
.photo-viewer__nav--next { right: 10px; }
.photo-viewer__nav[hidden] { display: none; }
.photo-viewer__info {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 14px 16px max(20px, env(safe-area-inset-bottom));
}
.photo-viewer__caption { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 20px; line-height: 1.3; }
.photo-viewer__caption[data-empty="true"] { color: #b9ab9a; font-style: italic; }
.photo-viewer__meta { margin: 0; color: #b9ab9a; font-size: 13px; }
.photo-viewer__actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.photo-viewer__actions[hidden] { display: none; }
.photo-viewer__actions button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 54px;
  border: 1px solid rgba(253, 248, 241, .22);
  border-radius: 10px;
  background: none;
  font-size: 12px;
}
.photo-viewer__actions button:hover { border-color: rgba(253, 248, 241, .6); }
.photo-viewer__actions button[aria-pressed="true"] { border-color: #fdf8f1; background: rgba(253, 248, 241, .1); }
.photo-viewer__actions .photo-viewer__remove { border-color: rgba(232, 150, 120, .4); color: #f0b49d; }
.photo-viewer__details { display: grid; gap: 10px; }
.photo-viewer__details[hidden] { display: none; }
.photo-viewer__details label { display: grid; gap: 6px; color: #d8cbbb; font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.photo-viewer__details input,
.photo-viewer__details select {
  min-height: 44px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid rgba(253, 248, 241, .25);
  border-radius: var(--radius-field);
  background: rgba(253, 248, 241, .06);
  color: #fdf8f1;
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
}
.photo-viewer__details select option { color: #17110d; }
.photo-viewer__details input:focus,
.photo-viewer__details select:focus { outline: none; border-color: #fdf8f1; }
.photo-viewer__done {
  justify-self: end;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid #fdf8f1;
  border-radius: 10px;
  background: none;
  font-weight: 500;
}
.photo-viewer :focus-visible { outline: 2px solid #fdf8f1; outline-offset: 2px; }
@media (min-width: 900px) {
  .photo-viewer__nav--prev { left: 24px; }
  .photo-viewer__nav--next { right: 24px; }
  .photo-viewer__stage { --swipe-pad: 0 84px; }
}

/* Sharing: the photos the client picked as favorites, shown small. */
.gallery-link[hidden], .gallery-link [hidden] { display: none; }
.gallery-link__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gallery-link__heading h2 { margin-bottom: 0; }
.gallery-link__heading span { color: var(--muted); font-size: 13px; }
.gallery-link__password { width: fit-content; padding: 12px 16px; border-radius: 10px; background: #f4eadb; }
.gallery-link__password strong { margin-left: 8px; font-size: 19px; letter-spacing: .08em; }
.gallery-link__url { display: block; overflow-wrap: anywhere; color: var(--ink); font-size: 13px; }
.gallery-link__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-link__actions button { min-height: 42px; padding: 8px 15px; border: 1px solid var(--ink); border-radius: 8px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.gallery-link__actions button:first-child { background: var(--ink); color: #fff; }
.gallery-link__actions button:disabled { opacity: .5; cursor: wait; }
.favorites-picked { display: grid; gap: 8px; }
.favorites-picked__photos { display: flex; flex-wrap: wrap; gap: 6px; }
.favorites-picked__photos img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; background: rgba(23, 17, 13, .06); }

/* The short message after an action ("Gallery link copied."). */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fdf8f1;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.toast[data-show="true"] { opacity: 1; transform: translate(-50%, -6px); }

@media (max-width: 640px) {
  .gallery-editor-page .form-grid { grid-template-columns: minmax(0, 1fr); }
  .gallery-editor-page .full { grid-column: auto; }
  .editor-publish { padding: 14px; }
}

/* Cover photo picker: one swipeable row, so the preview above and the
   style / position / effect options below stay close together. */
.gallery-editor-page .cover-strip .film-picker__grid { display: flex; gap: 8px; max-height: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.gallery-editor-page .cover-strip .film-thumb { flex: 0 0 84px; scroll-snap-align: start; }
.gallery-editor-page .cover-strip legend small { color: var(--muted); font-size: 12px; font-weight: 400; }
@media (max-width: 600px) {
  .gallery-editor-page .project-cover { max-width: 190px; }
}

/* Upload problems: one line per file, saying why and what to do. */
.gallery-editor-page .upload-errors { display: grid; gap: 4px; margin: 6px 0 10px; padding: 10px 12px 10px 28px; border: 1px solid rgba(155, 57, 72, .25); border-radius: 8px; background: rgba(155, 57, 72, .06); color: #7a2d39; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }

/* Pro footer fields (Look → under "Show Moumeants branding", Oct 25). */
.gallery-editor-page .footer-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding: 14px; border: 1px solid var(--line, rgba(42, 31, 22, .14)); border-radius: 12px; }
.gallery-editor-page .footer-fields[hidden] { display: none; }
.gallery-editor-page .footer-fields > .gallery-field-note, .gallery-editor-page .footer-fields > .full { grid-column: 1 / -1; margin: 0; }
@media (max-width: 600px) { .gallery-editor-page .footer-fields { grid-template-columns: 1fr; } }

/* Shoot plan answers (js/shoot-plan-link.js) */
.shoot-plan-answers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 0; margin: 4px 0 8px; padding: 14px 16px; border-radius: 10px; background: #f8f1e6; }
.shoot-plan-answers[hidden] { display: none; }
.shoot-plan-answers dt { margin-top: 10px; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.shoot-plan-answers dt:first-child { margin-top: 0; }
.shoot-plan-answers dd { margin: 0; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.shoot-plan-answers a { color: var(--ink); text-underline-offset: 3px; }
@media (min-width: 761px) {
  .shoot-plan-answers { grid-template-columns: 170px minmax(0, 1fr); gap: 10px 16px; padding: 18px 20px; }
  .shoot-plan-answers dt { margin-top: 0; padding-top: 3px; }
}

/* Nov 14 (Jay): fill a section from inside it. "+ Add photos to Highlights"
   above the photos, a button in an empty section, and one dark "Move to …"
   button while picking. */
.gallery-editor-page .photos-pick { justify-self: start; min-height: 36px; padding: 0; color: var(--ink); font-weight: 500; }
.gallery-editor-page .photos-pick:hover { color: var(--ink); text-decoration: underline; }
.collage-empty--pick { display: grid; justify-items: start; gap: 10px; }
.collage-empty--pick .hint { margin: 0; }
.gallery-editor-page .collage-empty--pick button { min-height: 44px; padding: 0 16px; border-color: var(--ink); background: var(--ink); color: #fdf8f1; }
.gallery-editor-page .select-bar .select-bar__actions:has(.select-bar__primary) { grid-template-columns: 1fr; }
.gallery-editor-page .select-bar .select-bar__primary { border-color: var(--ink); background: var(--ink); color: #fdf8f1; }

/* Look tab (Nov 14, Jay's mockups): one device preview and the looks as words.
   Phone: a row you swipe. Computer: preview left, the names as a list on the
   right. The theme cards stay on the page (hidden) for saving. The preview and
   word styles are in css/collections-swipe.css. */
[data-part="design"] .theme-grid { display: none !important; }
.look-hint-phone { display: none; }
/* Grid children: never wider than their column (the word row scrolls inside). */
[data-part="design"], .look-swipe { min-width: 0; }
.gallery-editor-page .look-swipe .cs-wheel__item,
.gallery-editor-page .look-swipe .cs-device button { min-height: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.gallery-editor-page .look-swipe .cs-device button {
  border-bottom: 1px solid transparent; padding: 6px 2px;
  font-size: 11px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.gallery-editor-page .look-swipe .cs-device button[aria-pressed="true"] { border-bottom-color: var(--ink); color: var(--ink); }
.look-swipe__actions { display: flex; flex-wrap: wrap; gap: 10px; min-height: 44px; }
.gallery-editor-page .look-swipe__actions button { min-height: 44px; padding: 0 18px; border-radius: 8px; }
.gallery-editor-page .look-swipe__actions .look-swipe__use { background: var(--ink); border-color: var(--ink); color: var(--cream, #fffdf9); }
.look-swipe__chosen {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px;
  background: rgba(42, 31, 22, .07); font-size: 14px; font-weight: 500; color: var(--ink);
}
@media (max-width: 760px) {
  .look-hint-phone { display: block; }
  .look-hint-computer { display: none; }
  .look-swipe .cs-wheel { margin: 6px 0 0; }
  .gallery-editor-page .look-swipe .cs-wheel__item {
    padding: 8px 4px 10px; font-family: "Cormorant Garamond", Georgia, serif; font-size: 27px; font-weight: 400; letter-spacing: 0; color: var(--ink);
  }
  /* A bit smaller than on Collections, so the names stay near the preview. */
  .look-swipe .cs-phone { width: min(52vw, 210px); }
  /* A fixed word width: a % width would count from inside the padding and
     put the middle word off centre. */
  .look-swipe .cs-wheel__track { --item: 150px; padding: 6px calc(50% - var(--item) / 2); }
  .look-swipe__actions { justify-content: center; margin: 14px 0 22px; }
}
@media (min-width: 761px) {
  .look-swipe {
    display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(200px, 1fr);
    column-gap: clamp(24px, 4vw, 56px); align-items: start; margin: 8px 0 26px;
  }
  .look-swipe { align-items: center; }
  .look-swipe .cs-side { padding-top: 0; }
  .gallery-editor-page .look-swipe .cs-wheel__item {
    display: flex; align-items: baseline; gap: 12px; width: auto;
    padding: 3px 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 22px; font-weight: 400; letter-spacing: 0; color: #8a8077;
  }
  .gallery-editor-page .look-swipe .cs-wheel__item[aria-selected="true"] { font-size: 36px; }
  .gallery-editor-page .look-swipe .cs-wheel__item[aria-selected="true"]::before { content: ""; display: block; flex: none; width: 22px; height: 1px; background: var(--ink); align-self: center; }
  .gallery-editor-page .look-swipe .cs-wheel__item:hover,
  .gallery-editor-page .look-swipe .cs-wheel__item[aria-selected="true"] { color: var(--ink); }
  .gallery-editor-page .look-swipe .cs-wheel__item[aria-selected="true"] { font-weight: 600; }
  .look-swipe__actions { margin-top: 22px; }
}
