/* photo-explore.css — the full-screen "Explore photos" picker (shop round 2, row 5, 2026-11-25).
 * One overlay for every "add photos" in the shop (photo book, albums, cart, /photos/ Select). photo-explore.js.
 *
 *   ground    Ink #0A0A0A at .96 over the page, a blur behind; the photographs are the only colour
 *   grid      justified rows from each card's own aspect ratio (--ar): flex-grow = ar, basis = ar × row height
 *   photos    radius 0 (law D1); a picked photo dims and carries a Bone mark, never a white box round it
 *   controls  one family: --r-ctl 8px fields, selects, buttons; --r-panel 14px is not used (the overlay is the page)
 *   primary   the shop primary: a flat Ember tint on the glass, a neutral hairline, white label — no gradient, no slab
 * Values from docs/ops/DESIGN.md only: Ink #0A0A0A · Bone #EDE7D8 · Ember #FF5B04 · Ember text #FF7D11 ·
 * Hanken Grotesk (labels) · Manrope (H2) · Instrument Sans (body) · ease cubic-bezier(.16,1,.3,1) · 180 / 320 ms.
 */
html.omtb-x-open { overflow: hidden; }

.omtb-x {
  --x-ink: #0A0A0A; --x-bone: #EDE7D8; --x-ember: #FF5B04; --x-ember-t: #FF7D11;
  --x-r: var(--r-ctl, 8px); --x-ease: cubic-bezier(.16, 1, .3, 1);
  --x-gut: clamp(16px, 3vw, 48px); --x-row: clamp(132px, 15vw, 240px);
  position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0;
  border: 0; color: #FFFFFF; background: transparent; overflow: hidden;
  font: 400 15px/1.5 "Instrument Sans", system-ui, sans-serif;
}
.omtb-x:not([open]) { display: none; }
.omtb-x::backdrop { background: rgba(10, 10, 10, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.omtb-x__in {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%;
  background: rgba(10, 10, 10, .94);
  animation: omtb-x-in 420ms var(--x-ease) both;
}
@keyframes omtb-x-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .omtb-x__in { animation: none; } }

/* ── head: title · search · collection · year · close ── */
.omtb-x__head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 24px;
  padding: 16px var(--x-gut); border-bottom: 1px solid rgba(237, 231, 216, .12);
}
.omtb-x__h { margin: 0; color: #FFFFFF; font: 700 clamp(20px, 1.6vw, 24px)/1.15 Manrope, "Hanken Grotesk", system-ui, sans-serif; letter-spacing: -.02em; white-space: nowrap; }
.omtb-x__tools { display: flex; align-items: center; gap: 8px; min-width: 0; }
.omtb-x__search { position: relative; flex: 1 1 320px; min-width: 0; max-width: 560px; margin: 0; }
.omtb-x__ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: grid; color: rgba(255, 255, 255, .56); pointer-events: none; }
.omtb-x .omtb-x__search input,
.omtb-x .omtb-x__sel select {
  box-sizing: border-box; width: 100%; min-height: 44px; margin: 0; border: 0; border-radius: var(--x-r);
  color: #FFFFFF; background: rgba(26, 26, 26, .62); box-shadow: inset 0 0 0 1px rgba(237, 231, 216, .16);
  font: 500 15px/1.2 "Instrument Sans", system-ui, sans-serif; outline: none; -webkit-appearance: none; appearance: none;
  transition: box-shadow 180ms var(--x-ease);
}
.omtb-x .omtb-x__search input { padding: 0 14px 0 42px; }
.omtb-x .omtb-x__search input::placeholder { color: rgba(255, 255, 255, .5); }
.omtb-x .omtb-x__search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.omtb-x__sel { position: relative; flex: 0 1 220px; min-width: 0; margin: 0; }
.omtb-x__sel--year { flex-basis: 140px; }
.omtb-x__sel[hidden] { display: none; }
.omtb-x .omtb-x__sel select { padding: 0 36px 0 14px; text-overflow: ellipsis; cursor: pointer; }
.omtb-x .omtb-x__sel select:disabled { opacity: .44; cursor: default; }
.omtb-x__sel::after {
  content: ""; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px; margin-top: -5px; pointer-events: none;
  border-right: 1.5px solid rgba(255, 255, 255, .64); border-bottom: 1.5px solid rgba(255, 255, 255, .64); transform: rotate(45deg);
}
.omtb-x .omtb-x__sel option, .omtb-x .omtb-x__sel optgroup { color: #FFFFFF; background: #0A0A0A; }
.omtb-x .omtb-x__search input:hover, .omtb-x .omtb-x__sel select:hover { box-shadow: inset 0 0 0 1px rgba(237, 231, 216, .32); }
.omtb-x .omtb-x__search input:focus-visible, .omtb-x .omtb-x__sel select:focus-visible { box-shadow: inset 0 0 0 1px rgba(237, 231, 216, .5), 0 0 0 2px var(--x-ink), 0 0 0 3px var(--x-ember-t); }
.omtb-x__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.omtb-x__ic {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: var(--x-r);
  color: rgba(255, 255, 255, .86); background: transparent; box-shadow: inset 0 0 0 1px rgba(237, 231, 216, .16); cursor: pointer;
  transition: box-shadow 180ms var(--x-ease), color 180ms var(--x-ease);
}
.omtb-x__ic:hover { color: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(237, 231, 216, .4); }
.omtb-x__ic:focus-visible { outline: none; box-shadow: inset 0 0 0 1px rgba(237, 231, 216, .5), 0 0 0 2px var(--x-ink), 0 0 0 3px var(--x-ember-t); }

/* ── body: the justified grid ── */
.omtb-x__body { overflow-y: auto; overscroll-behavior: contain; padding: 16px var(--x-gut) 32px; outline: none; scrollbar-width: thin; scrollbar-color: rgba(237, 231, 216, .24) transparent; }
.omtb-x__grid { display: flex; flex-wrap: wrap; gap: 6px; }
.omtb-x__grid::after { content: ""; flex: 999 1 calc(var(--x-row) * 2); }   /* the last row keeps its height instead of stretching */
.omtb-x__t {
  position: relative; display: block; flex: var(--ar, 1.5) 1 calc(var(--ar, 1.5) * var(--x-row)); min-width: 0;
  margin: 0; padding: 0; border: 0; border-radius: 0; background: rgba(237, 231, 216, .06); cursor: pointer; overflow: hidden;
}
.omtb-x__t img {
  display: block; width: 100%; height: auto; aspect-ratio: var(--ar, 1.5); object-fit: cover; border-radius: 0;
  transition: filter 320ms var(--x-ease), transform 320ms var(--x-ease);
}
.omtb-x__cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 10px 8px; color: #FFFFFF; text-align: left;
  font: 600 12px/1.3 "Hanken Grotesk", system-ui, sans-serif; letter-spacing: .01em;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0), rgba(10, 10, 10, .72));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity 320ms var(--x-ease);
}
.omtb-x__mark {
  position: absolute; top: 8px; left: 8px; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; box-sizing: border-box;
  border-radius: var(--x-r); color: var(--x-ink); background: var(--x-bone);
  font: 700 13px/1 "Hanken Grotesk", system-ui, sans-serif; letter-spacing: .02em;
  opacity: 0; transform: scale(.9); transition: opacity 180ms var(--x-ease), transform 180ms var(--x-ease);
}
.omtb-x__t[aria-pressed="true"] img { filter: brightness(.58); transform: scale(.94); }
.omtb-x__t[aria-pressed="true"] .omtb-x__mark { opacity: 1; transform: none; }
@media (hover: hover) {
  .omtb-x__t:hover img { filter: brightness(1.08); }
  .omtb-x__t[aria-pressed="true"]:hover img { filter: brightness(.66); }
  .omtb-x__t:hover .omtb-x__cap { opacity: 1; }
}
.omtb-x__t:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--x-ink), 0 0 0 3px var(--x-ember-t); z-index: 1; }
.omtb-x__t:focus-visible .omtb-x__cap { opacity: 1; }
.omtb-x__empty { margin: 48px 0; color: rgba(255, 255, 255, .72); font: 400 16px/1.5 "Instrument Sans", system-ui, sans-serif; text-align: center; }
.omtb-x__sent { height: 1px; }
.omtb-x.is-loading .omtb-x__sent { height: 64px; background: linear-gradient(90deg, transparent, rgba(237, 231, 216, .08), transparent) center / 50% 1px no-repeat; }

/* ── foot: count · clear · cancel · add ── */
.omtb-x__foot {
  display: flex; align-items: center; gap: 8px; padding: 12px var(--x-gut) calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(237, 231, 216, .12); background: rgba(10, 10, 10, .9);
}
.omtb-x__count { margin: 0 8px 0 0; color: rgba(255, 255, 255, .86); font: 600 14px/1.2 "Hanken Grotesk", system-ui, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.omtb-x__gap { flex: 1 1 auto; }
.omtb-x__btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 0 22px; box-sizing: border-box;
  border: 0; border-radius: var(--x-r); color: #FFFFFF; background: rgba(18, 18, 18, .6);
  box-shadow: inset 0 0 0 1px rgba(237, 231, 216, .24), inset 0 1px 0 rgba(237, 231, 216, .12);
  font: 600 12px/1 "Hanken Grotesk", system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  cursor: pointer; transition: background 180ms var(--x-ease), box-shadow 180ms var(--x-ease), opacity 180ms var(--x-ease);
}
.omtb-x__btn--ghost { padding: 0 12px; background: transparent; box-shadow: none; color: rgba(255, 255, 255, .72); }
.omtb-x__btn--quiet { background: transparent; }
.omtb-x__btn--primary { background: rgba(16, 16, 16, .72); box-shadow: inset 0 0 0 1px rgba(255, 91, 4, .72), inset 0 1px 0 rgba(237, 231, 216, .10); color: #EDE7D8; } /* = the shop primary (Place order) */
.omtb-x__btn[hidden] { display: none; }
.omtb-x__btn:disabled { opacity: .32; cursor: default; box-shadow: inset 0 0 0 1px rgba(237, 231, 216, .14); } /* disabled reads disabled: no Ember until something is picked */
@media (hover: hover) {
  .omtb-x__btn:not(:disabled):hover { background: rgba(237, 231, 216, .08); box-shadow: inset 0 0 0 1px rgba(237, 231, 216, .4), inset 0 1px 0 rgba(237, 231, 216, .2); }
  .omtb-x__btn--ghost:not(:disabled):hover { background: transparent; box-shadow: none; color: #FFFFFF; }
  .omtb-x__btn--primary:not(:disabled):hover { background: rgba(255, 91, 4, .10); box-shadow: inset 0 0 0 1px #FF5B04, inset 0 1px 0 rgba(237, 231, 216, .14); }
}
.omtb-x__btn:focus-visible { outline: none; box-shadow: inset 0 0 0 1px rgba(237, 231, 216, .5), 0 0 0 2px var(--x-ink), 0 0 0 3px var(--x-ember-t); }

/* ── tablet: the tools take their own row under the title ── */
@media (max-width: 1023px) {
  .omtb-x__head { grid-template-columns: minmax(0, 1fr) auto; }
  .omtb-x__tools { grid-column: 1 / -1; grid-row: 2; }
  .omtb-x__search { max-width: none; }
}
/* ── phone: search on its own line, the two selects share the next; two photos a row ── */
@media (max-width: 600px) {
  .omtb-x { --x-gut: 16px; --x-row: 112px; }
  .omtb-x__head { gap: 10px 12px; padding-top: 12px; padding-bottom: 12px; }
  .omtb-x__tools { flex-wrap: wrap; }
  .omtb-x__search { flex: 1 1 100%; }
  .omtb-x__sel { flex: 1 1 calc(50% - 4px); }
  .omtb-x__grid { gap: 4px; }
  .omtb-x__btn { padding: 0 16px; }
  .omtb-x__btn--quiet { display: none; }   /* the close in the head is Cancel at this width */
  .omtb-x__count { font-size: 13px; }
}

/* ── the triggers that live outside the overlay ── */
.omtb-spot__row .omtb-x-open-btn { margin-left: auto; }
/* the photo book's Photos step: the overlay's trigger + what is in the book so far */
.omtb-book__explore { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 4px 0 8px; }
.omtb-book__picked { color: rgba(255, 255, 255, .72); font: 600 11px/1.3 "Hanken Grotesk", system-ui, sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.omtb-book [data-book-fallback][hidden] { display: none !important; }
