/* Client gallery (gallery.<domain>). Full brand: wordmark, full-bleed cover, bracket eyebrow, one italic word per
   heading, one handwritten accent per page (docs/studio/design.md). Tokens only: no hex, no font names. */

html.sheet-open { overflow: hidden; }
.noscript { padding: var(--space-4) var(--gutter); text-align: center; }

/* ---------- wordmark (same treatment as site/assets/css/components.css .wordmark; components.css is not loaded
   here because its .btn/.eyebrow/.hand rules collide with /shared/app.css) ---------- */
.wordmark { display: inline-grid; justify-items: center; gap: .35rem; text-decoration: none; line-height: 1; color: var(--ink); }
.wordmark .wm-name { font-family: var(--font-display); font-style: italic; font-weight: var(--display-weight); font-size: 1.6rem; letter-spacing: .01em; }
.wordmark .wm-rule { display: block; width: 34px; height: 1px; background: var(--olive); }
.wordmark .wm-sub { font-family: var(--font-body); font-size: .56rem; letter-spacing: .38em; text-transform: uppercase; font-weight: var(--body-weight-strong); }
.wordmark.is-light { color: var(--paper-white); }
.wordmark.is-light .wm-rule { background: var(--cream-3); }
.wordmark:focus-visible { outline-color: currentColor; outline-offset: 6px; }
@media (max-width: 699px) { .wordmark .wm-name { font-size: 1.4rem; } }

/* ---------- shared bits ---------- */
.scrim-photo {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(color-mix(in srgb, var(--ink) 45%, transparent), transparent 30%, transparent 55%, color-mix(in srgb, var(--ink) 72%, transparent));
}
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-text { position: absolute; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 0 var(--space-2); text-align: center; color: var(--paper-white); }
.cover-eyebrow { color: var(--cream-2); }
.cover-title { color: var(--paper-white); font-size: var(--fs-h1); line-height: 1.04; }
.btn-light { background: transparent; color: var(--paper-white); border-color: var(--paper-white); margin-top: .5rem; }
.btn-light:hover { background: var(--paper-white); color: var(--brown); }
.btn-light:focus-visible { outline-color: var(--paper-white); }
.tilt { display: inline-block; transform: rotate(-3deg); }
.hand.tilt { color: var(--brown); font-size: 1.5rem; line-height: 1.2; }
.ink { color: var(--ink); font-weight: var(--body-weight-strong); }
.btn-link[disabled] { opacity: .5; cursor: not-allowed; text-decoration: none; }

/* ---------- quiet pages ---------- */
.quiet { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; outline: none; }
.quiet-brand { display: flex; justify-content: center; padding: var(--space-4) var(--gutter) 0; }
.quiet-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); max-width: 34rem; margin: 0 auto; padding: var(--space-5) var(--gutter) var(--space-7); text-align: center; }
.quiet-body h1 { font-size: var(--fs-h2); margin-bottom: var(--space-1); }
.quiet-body p { max-width: 44ch; }
.quiet-body .btn { margin-top: var(--space-2); }
.quiet-name { font-family: var(--font-display); font-size: var(--fs-h4); color: var(--ink); }
.loading { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; outline: none; }

/* ---------- sign-in ---------- */
.signin { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; outline: none; }
.signin-cover { position: relative; flex: none; height: clamp(300px, 42vh, 380px); overflow: hidden; background: var(--ink); }
.signin-cover .cover-img { object-position: center 30%; }
.signin-brand { position: absolute; top: 20px; left: 0; right: 0; display: flex; justify-content: center; }
.signin-cover .cover-text { bottom: 22px; gap: .3rem; }
.signin-cover .cover-title { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem); }
.signin-body { flex: 1; display: flex; padding: 28px 24px calc(28px + env(safe-area-inset-bottom)); }
.signin-form { flex: 1; width: 100%; max-width: 26rem; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.signin-intro { display: grid; gap: 6px; }
.signin-intro h2 { font-size: 1.625rem; outline: none; }
.signin-intro p { font-size: .875rem; }
.signin-note { color: var(--ink); }
.signin .field input, .signin .field textarea { font-size: 1rem; }
.form-error { color: var(--ink); font-size: .875rem; font-weight: var(--body-weight-strong); }
.signin-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem var(--space-2); font-size: .8125rem; }
.signin-links .btn-link { font-size: .8125rem; }
.signin-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--cream-3); font-size: .8125rem; color: var(--muted); }
.signin-foot .btn-link { font-size: .8125rem; padding: 0; vertical-align: baseline; min-height: 0; line-height: inherit; }
@media (min-width: 900px) {
  .signin { display: grid; grid-template-columns: 1fr 1fr; }
  .signin-cover { position: sticky; top: 0; height: 100vh; height: 100dvh; }
  .signin-cover .cover-text { bottom: 56px; }
  .signin-body { align-items: center; padding: var(--space-6) var(--space-5); }
  .signin-form { flex: none; }
  .signin-foot { margin-top: var(--space-2); }
}

/* one input styled as six boxes: the transparent input sits on top and takes taps, paste and autofill */
.code { position: relative; }
.code-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.code-box { height: 54px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.625rem; color: var(--ink); background: var(--paper-white); border: 1px solid var(--cream-3); border-radius: 10px; }
.code-box.is-active { border: 2px solid var(--brown); }
.code.is-invalid .code-box { border-color: var(--brown); }
.code-input {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: transparent; caret-color: transparent; font-size: 1rem; letter-spacing: 2em; text-indent: -999px;
}
.code-input::selection { background: transparent; }
.code-input:focus-visible { outline: 2px solid var(--brown); outline-offset: 4px; }

/* ---------- laptop cover ---------- */
.cover { position: relative; height: clamp(440px, 70vh, 640px); overflow: hidden; background: var(--ink); color: var(--paper-white); }
.cover-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); padding: 22px var(--gutter); }
.cover-who { font-size: .8125rem; text-align: right; }
.cover .cover-text { bottom: 48px; }

/* ---------- phone header ---------- */
.phead { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); padding: 16px 16px 10px; }
.phead-text { display: flex; flex-direction: column; min-width: 0; }
.phead-title { font-size: 1.625rem; line-height: 1.1; overflow-wrap: anywhere; }
.round-dl { flex: none; width: 44px; height: 44px; border-radius: var(--radius-pill); background: var(--brown); color: var(--paper-white); display: flex; align-items: center; justify-content: center; }
.round-dl:hover { background: var(--ink); }

/* ---------- sticky set bar ---------- */
.setbar { position: sticky; top: 0; z-index: 20; background: var(--cream); border-bottom: 1px solid var(--cream-3); }
.setbar-in { max-width: var(--wrap); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 10px; }
.setbar-chips { display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; }
.setbar .chip:not([aria-pressed="true"]) { background: transparent; }
.setbar .chip { font-size: .8125rem; }
.setbar-dl { margin-left: auto; }
@media (max-width: 699px) {
  .setbar { border-bottom: 0; }
  .setbar-in { padding: 0 0 12px; }
  .setbar-chips { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding: 4px 16px 0; scrollbar-width: none; }
  .setbar-chips::-webkit-scrollbar { display: none; }
  .setbar .chip { flex: none; padding: 0 14px; }
}

/* ---------- body: sections + download panel ---------- */
#main { outline: none; }
.gbody { max-width: var(--wrap); margin: 0 auto; padding: 28px var(--gutter) var(--space-5); display: flex; gap: 32px; align-items: flex-start; }
.sections { flex: 1 1 0; min-width: 0; outline: none; scroll-margin-top: 72px; }
.gsection + .gsection { margin-top: var(--space-5); }
.gsection-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem 14px; margin-bottom: 18px; }
.gsection-head h2 { font-size: var(--fs-h3); }
.gsection-count { margin-left: auto; font-size: .8125rem; color: var(--muted); }
.empty .icon { display: inline-block; vertical-align: -2px; }
@media (max-width: 699px) {
  .gbody { padding: 8px 0 var(--space-4); display: block; }
  .gsection-head { padding: 0 16px; margin-bottom: 12px; }
  .gsection + .gsection { margin-top: var(--space-4); }
  .sections { scroll-margin-top: 60px; }
}

/* ---------- grids ---------- */
.jgrid { display: flex; flex-direction: column; gap: 8px; }
.jrow { display: flex; gap: 8px; }
.tile { position: relative; margin: 0; min-width: 0; overflow: hidden; background: var(--cream-3); }
.tile-open { display: block; width: 100%; height: 100%; padding: 0; overflow: hidden; }
.jrow .tile-open img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-hover) var(--ease-out); }
.jrow .tile-open:hover img { transform: scale(1.04); }
.tile-open:focus-visible { outline: 2px solid var(--paper-white); outline-offset: -2px; box-shadow: inset 0 0 0 4px var(--brown); }
.pgrid { display: flex; gap: 4px; padding: 0 4px; }
.pcol { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tile-phone .tile-open img { width: 100%; height: auto; }

/* heart: a 44 px target around a 36 px dot */
.heart { position: absolute; right: 4px; bottom: 4px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--paper-white); }
.heart-dot { width: 36px; height: 36px; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--ink) 50%, transparent); transition: background-color var(--dur-state), color var(--dur-state); }
.heart:hover .heart-dot { background: color-mix(in srgb, var(--ink) 75%, transparent); }
.heart[aria-pressed="true"] .heart-dot { background: var(--paper-white); color: var(--brown); }
.heart:focus-visible { outline: none; }
.heart:focus-visible .heart-dot { outline: 2px solid var(--paper-white); outline-offset: 2px; box-shadow: 0 0 0 4px var(--brown); }
.heart-sm { right: 0; bottom: 0; }
.heart-sm .heart-dot { width: 30px; height: 30px; }

/* ---------- laptop download panel ---------- */
.dl-panel {
  flex: 0 0 300px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto;
  background: var(--paper-white); border-radius: var(--radius-lg); padding: 22px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-photo);
}
.dl-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-1); }
.dl-head h2 { outline: none; }
.dl-head .icon-btn { margin-right: -10px; }
.dl-set { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; }
.dl-set legend { padding: 0; margin-bottom: 4px; }
.dl-opt { display: flex; gap: 10px; align-items: center; min-height: var(--tap); font-size: var(--fs-small); cursor: pointer; }
.dl-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--brown); flex: none; }
.dl-opt:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.dl-note { font-size: .75rem; color: var(--muted); }
@media (max-width: 899px) {
  .gbody.has-panel { flex-direction: column-reverse; align-items: stretch; }
  .dl-panel { position: static; flex: none; max-height: none; }
}

/* zip status and parts */
.zip-result { display: grid; gap: 10px; font-size: .875rem; }
.zip-sum { color: var(--ink); font-weight: var(--body-weight-strong); }
.zip-wait { display: flex; align-items: center; gap: 10px; }
.zip-wait .spinner { flex: none; }
.zip-parts { list-style: none; display: grid; gap: 8px; }
.zip-part { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border: 1px solid var(--cream-3); border-radius: var(--radius-md); background: var(--cream-2); color: var(--ink); text-decoration: none; }
a.zip-part:hover { border-color: var(--brown); }
.zip-part > span { display: grid; min-width: 0; }
.zip-name { overflow-wrap: anywhere; }
.zip-meta { font-size: .75rem; color: var(--muted); }
.zip-part.is-wait { color: var(--muted); }

/* ---------- phone download sheet ---------- */
.dl-sheet { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; }
.dl-sheet .dl-head h2 { font-size: 1.5rem; }
.sheet-opt { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); min-height: 56px; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--cream-3); background: var(--cream-2); color: var(--ink); text-align: left; }
.sheet-opt:hover { border-color: var(--brown); }
.sheet-opt[disabled] { opacity: .55; cursor: not-allowed; }
.sheet-opt.is-primary { background: var(--brown); border-color: var(--brown); color: var(--paper-white); }
.sheet-opt.is-primary:hover { background: var(--ink); border-color: var(--ink); }
.sheet-opt-text { display: flex; flex-direction: column; min-width: 0; }
.sheet-opt-title { font-size: var(--fs-small); }
.sheet-opt-sub { font-size: .75rem; color: var(--muted); }
.sheet-opt.is-primary .sheet-opt-sub { color: var(--cream-3); }
.sheet-opt-side { font-size: .8125rem; color: var(--brown); flex: none; }
.sheet-mail { align-self: center; font-size: .8125rem; }
.fav-saver { display: grid; gap: 8px; font-size: .875rem; }
.dl-sheet .dl-note { text-align: center; }

/* ---------- footer ---------- */
.gfoot { max-width: var(--wrap); margin: 0 auto; padding: var(--space-4) var(--gutter) calc(var(--space-5) + env(safe-area-inset-bottom)); border-top: 1px solid var(--cream-3); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-1) var(--space-3); font-size: .8125rem; color: var(--muted); }
.gfoot p { overflow-wrap: anywhere; }
.gfoot .btn-link { font-size: .8125rem; }
.gfoot-copy { font-size: var(--fs-label); letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 699px) { .gfoot { margin: 0 16px; padding-inline: 0; } }

/* ---------- lightbox (PhotoSwipe) ---------- */
.pswp {
  --pswp-bg: var(--ink);
  --pswp-placeholder-bg: var(--brown);
  --pswp-icon-color: var(--paper-white);
  --pswp-icon-color-secondary: var(--ink);
  --pswp-icon-stroke-color: var(--ink);
  --pswp-error-text-color: var(--paper-white);
}
.pswp__button--heart, .pswp__button--download-photo { display: flex; align-items: center; justify-content: center; color: var(--paper-white); }
.pswp-ic { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.pswp__button:focus-visible { outline: 2px solid var(--paper-white); outline-offset: -8px; }
.pswp__button--heart[aria-pressed="true"] { opacity: 1; }
