/* Photo Live: editorial album and photographer studio share a restrained palette. */
:root {
  color-scheme: light;
  --paper: #f7f5f0;
  --surface: #fdfcf9;
  --ink: #202321;
  --muted: #60645e;
  --line: #e2ded5;
  --red: #a43c2f;
  --red-dark: #823026;
  --green: #355c46;
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", STSong, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --audience-font: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --night: #101211;
  font: 15px/1.5 var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
h1, h2, p { margin: 0; }
h1 { font-family: var(--serif); font-weight: 600; }
h2 { font-size: 1.15rem; font-weight: 680; letter-spacing: -.02em; }
a { color: var(--green); text-underline-offset: .22em; }
button, input, textarea, a { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, a.action, .studio-upload label {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 610;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 150ms, color 150ms, background 150ms;
}
button:disabled, button[aria-disabled="true"] { cursor: default; opacity: .43; }
button.primary, a.action.primary, .studio-upload label { background: var(--ink); border-color: var(--ink); color: white; }
@media (hover:hover) {
  button:hover:not(:disabled), a.action:hover { background: #eeebe4; border-color: #d7d2c7; }
  button.primary:hover:not(:disabled), a.action.primary:hover, .studio-upload label:hover { background: #3a413a; border-color: #3a413a; color: #fff; }
}
:where(button, a, input, textarea, summary):focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
svg { vertical-align: middle; }
button > svg, a.action > svg, .album-mark > svg, .brand > svg, .studio-upload label > svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65;
  stroke-linecap: round; stroke-linejoin: round; flex: none;
}
[hidden] { display: none !important; }
.visually-hidden {
  clip-path: inset(50%); position: absolute; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden; white-space: nowrap; border: 0 !important;
}
small { color: var(--muted); }

.top { border-bottom: 1px solid var(--line); }
.bar {
  max-width: 1530px; min-height: 66px; margin: auto; padding: 10px clamp(16px, 3.1vw, 44px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: .95rem; font-weight: 680; letter-spacing: .075em; white-space: nowrap; }
.brand small { color: var(--muted); font: 11px Georgia, serif; letter-spacing: .1em; }
.mark {
  flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px;
  border: 1px solid #b76556; border-radius: 50%; color: var(--red);
}
.mark::after {
  content: ""; width: 13px; height: 13px; border: 1px solid currentColor; border-radius: 50%;
  background: conic-gradient(from 37deg, currentColor 0 27deg, transparent 27deg 90deg, currentColor 90deg 117deg, transparent 117deg 180deg, currentColor 180deg 207deg, transparent 207deg 270deg, currentColor 270deg 297deg, transparent 297deg);
}
.wrap { max-width: 1240px; margin: auto; padding: 34px clamp(16px, 4vw, 45px) 60px; }
.row, .actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.muted, .meta { color: var(--muted); font-size: .84rem; }
.meta { line-height: 1.65; }
.block { min-width: 0; padding: 19px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.space { margin-top: 15px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 19px; margin-top: 20px; }
.side { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.settings { display: grid; gap: 13px; }
label { font-size: .85rem; font-weight: 600; display: grid; gap: 6px; }
input:not([type=checkbox]), textarea {
  color: var(--ink); min-width: 0; width: 100%; background: #fff; border: 1px solid #d4cfc3; border-radius: 7px;
  padding: 9px 10px; font-size: 1rem;
}
input[type=checkbox] { height: 17px; width: 17px; accent-color: var(--ink); cursor: pointer; }
input[type=file] { font-size: .82rem; }
input[type=file]::file-selector-button {
  padding: 6px 9px; margin: 0 7px 0 0; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; background: var(--paper); cursor: pointer;
}
.status {
  display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; color: var(--green); background: #e9eee5;
  padding: 4px 8px; border-radius: 5px; white-space: nowrap; font-weight: 640;
}
.event { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 53px; padding: 10px 14px; text-align: left; margin-top: 9px; }
.event-name { font-weight: 650; overflow-wrap: anywhere; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 12px; }
.card { min-width: 0; position: relative; overflow: hidden; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.card img { width: 100%; aspect-ratio: 4/3; display: block; object-fit: cover; background: #e7e2d8; }
.card label, .card .caption { display: flex; align-items: center; gap: 6px; padding: 8px; overflow-wrap: anywhere; font-size: .78rem; }
.card button { min-height: 30px; padding: 4px 7px; font-size: .74rem; }
.cover-small { width: 100%; aspect-ratio: 2.4; object-fit: cover; border-radius: 6px; }
.queue { max-height: 270px; overflow: auto; font-size: .81rem; }
.queue div { padding: .42rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.tabs { display: flex; gap: 7px; flex-wrap: wrap; }
.tabs button[aria-pressed="true"] { color: #fff; background: var(--ink); }
.login { max-width: 415px; margin: 10vh auto; padding: 28px; }
.login form { display: grid; gap: 14px; margin-top: 20px; }
.login .brand { margin-bottom: 21px; }
.main-title { margin: 14px 0; }
.main-title h1 { font-size: clamp(29px, 4vw, 44px); }
.link { font-size: .83rem; overflow-wrap: anywhere; }
.error { color: var(--red-dark); }
.empty { padding: 24px 0; color: var(--muted); }
.upload-progress { font-size: .83rem; line-height: 1.6; }
.confirm-grid { max-height: 34vh; overflow: auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.confirm-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; }

dialog {
  border: 1px solid var(--line); border-radius: 15px; max-width: min(92vw, 540px); padding: 21px;
  color: var(--ink); background: var(--surface); box-shadow: 0 18px 70px #14171440;
}
dialog::backdrop { background: #101311ad; }
dialog h2 { margin-bottom: 9px; }
dialog .row { margin-top: 17px; }
#toast:not(:empty) {
  position: fixed; z-index: 10; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  padding: 10px 15px; max-width: 87vw; border: 1px solid #373c36; border-radius: 10px;
  background: #272b27; color: white; box-shadow: 0 4px 20px #151a1533; font-size: .86rem;
}

/* Audience: cover first, calm wall, and a dark full-resolution viewer. */
/* The native viewing dialogs are siblings of the album, not font descendants. */
.album, .viewer, .album-panel { font-family: var(--audience-font); }
.album { width: min(100%, 1080px); margin: 0 auto; min-height: 100vh; background: var(--paper); }
.album-inner { padding: 0 clamp(14px, 3vw, 30px) max(24px, env(safe-area-inset-bottom)); }
.album-hero {
  position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: clamp(272px, 68vw, 395px);
  overflow: hidden; color: #fff; background: radial-gradient(ellipse at 75% 0%, #75786c 0, #303832 50%, #202923 100%);
}
.album-hero > .banner, .album-hero-shade { position: absolute; display: block; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.album-hero > .banner { object-fit: cover; object-position: center 51%; z-index: -2; }
.album-hero-shade { z-index: -1; background: linear-gradient(180deg,#05060974,transparent 45%), linear-gradient(0deg,#0b0d10e9,#0b0d1070 45%,transparent 77%); }
.album-top {
  position: absolute; z-index: 2; top: max(9px, env(safe-area-inset-top)); left: clamp(19px, 4vw, 38px);
  right: clamp(13px, 3vw, 30px); display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.album-mark { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: .77rem; font-weight: 660; letter-spacing: .1em; text-shadow: 0 1px 6px #131513; }
.album-mark > svg { width: 24px; height: 24px; }
.album-top-actions { display: flex; gap: 2px; }
.album-top button.album-icon {
  min-height: 44px; width: 44px; padding: 0; color: #fff; background: none; border: 0; border-radius: 50%; position: relative; isolation: isolate;
}
.album-top button.album-icon::before { content: ""; position: absolute; inset: 4px; border: 1px solid #ffffffa6; background: #16191764; border-radius: 50%; z-index: -1; }
.album-top button.album-icon:hover:not(:disabled)::before { background: #0b100de0; }
.album .intro {
  width: 100%; position: relative; padding: 83px clamp(20px, 4vw, 40px) clamp(19px, 5.5vw, 34px);
}
.album-kicker {
  display: flex; align-items: center; gap: 8px; color: #f4e9dd; font-size: 11px; line-height: 1.5;
  letter-spacing: .12em; font-weight: 650;
}
.album-kicker::before { content: ""; border-radius: 50%; width: 6px; height: 6px; background: #e7826d; flex: none; }
.album .intro h1 {
  margin-top: 11px; font: 600 clamp(36px, 9.4vw, 72px)/1.08 var(--audience-font);
  letter-spacing: .01em; overflow-wrap: anywhere; text-shadow: 0 3px 21px #0d0d19a8;
}
.album .intro .meta { margin-top: 11px; color: #fbf4ed; letter-spacing: .045em; text-shadow: 0 1px 6px #111; }
.album .intro .meta:empty { display: none; }
.gallery-head {
  display: flex; justify-content: space-between; align-items: center; min-height: 72px; padding: 8px 0; gap: 10px;
}
.album-section-title { display: flex; align-items: baseline; gap: 9px; }
.album-section-title h2 { font-size: clamp(21px, 5vw, 25px); letter-spacing: -.045em; }
.album-section-title #total { color: var(--muted); font-size: 12px; line-height: 1.4; font-variant-numeric: tabular-nums; white-space: nowrap; }
.album-order { color: var(--muted); font-size: .78rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.album-order svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.photos { --photo-row-height-cap: clamp(292px, 42vw, 520px); display: flex; flex-direction: column; gap: 5px; }
.photo-row { display: flex; align-items: flex-start; gap: 5px; }
.photo-row:empty { display: none; }
.photo, .photo:hover:not(:disabled) {
  position: relative; display: block; border: none; border-radius: 0; padding: 0; overflow: hidden;
  min-height: 0; background: #e7e2d9;
}
/* The flexible widths use each original aspect ratio. For an unusually tall row,
   limit every width by the same height so the layout never needs to crop pixels. */
.photo-row .photo {
  flex-basis: 0; flex-shrink: 1; min-width: 0;
  max-width: min(100%, calc(var(--photo-row-height-cap) * var(--photo-ratio)));
}
.photo-row .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.photo-like-count {
  position: absolute; inset-inline-start: 4px; inset-block-end: 4px;
  display: inline-flex; align-items: center; gap: 3px; max-width: calc(100% - 8px);
  padding: 3px 5px; border-radius: 8px; overflow: hidden;
  color: #fff; background: rgba(24, 26, 25, .76);
  font-family: var(--audience-font); font-size: .6875rem;
  line-height: 1; font-weight: 550; font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.photo-like-count svg { width: 12px; height: 12px; flex: none; }
.photo-like-count > span { min-width: 0; white-space: nowrap; overflow: hidden; }
.photo:has(.retry) .photo-like-count { display: none; }
.photo img { transition: transform 170ms; }
.photo:active img { transform: scale(.978); }
.photo .retry { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); background: #f0ece3; }
#more, #latest, #network { margin: 10px 0; }
#return-note:not([hidden]), #share-status:not(:empty) { padding: 9px 0; overflow-wrap: anywhere; color: var(--muted); }
.album #account:not(:empty) { border-top: 1px solid var(--line); padding-top: 14px; }
#account img, .album-sheet img[alt="我的头像"] { border-radius: 50%; object-fit: cover; }
.notice, .notice.primary {
  position: fixed; z-index: 3; top: max(12px, calc(env(safe-area-inset-top) + 4px)); left: 50%; transform: translateX(-50%);
  min-height: 44px; max-width: calc(100% - 22px); padding-inline: 15px; border: 1px solid #fff9; border-radius: 99px;
  background: #262c27; color: #fff; box-shadow: 0 3px 18px #14191750; white-space: nowrap;
}
.notice.primary:hover:not(:disabled) { background: #303932; border-color: #fff; }

.viewer {
  inset: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  padding: 0; border: 0; border-radius: 0; background: var(--night); color: #f3f1eb; box-shadow: none;
}
.viewer-shell { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.vbar {
  width: min(100%, 1100px); margin-inline: auto; padding: max(5px, env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 5px max(12px,env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
#counter { color: #ddd9d2; font-size: 13px; line-height: 1.4; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.viewer button, .viewer a.action { border: 1px solid transparent; border-radius: 99px; background: transparent; color: #f3f1eb; min-height: 44px; }
.viewer button:hover:not(:disabled), .viewer a.action:hover { background: #343934; border-color: #545952; }
.viewer button:focus-visible, .viewer a:focus-visible { outline-color: #e99b82; outline-offset: 0; }
.vbar button { min-width: 44px; padding: 0 10px; }
.vbar button > svg { width: 23px; height: 23px; }
/* Isolate the zoom/pan surface from the gallery, action bar and native save image. */
.viewer-image-region { position: relative; min-width: 0; min-height: 0; isolation: isolate; }
.stage {
  position: absolute; inset: 0; min-width: 0; min-height: 0; overflow: hidden;
  touch-action: none; overscroll-behavior: contain; isolation: isolate; cursor: grab;
}
.stage #visible {
  position: absolute; width: 100%; height: 100%; object-fit: contain; inset: 0;
  display: block; user-select: none; -webkit-user-drag: none; transform-origin: 0 0;
}
.stage.is-dragging { cursor: grabbing; }
.viewer #zoom[aria-pressed="true"] { background: #fff1d51a; border-color: #fff1d533; }
.viewer .photo-minimap {
  position: absolute; z-index: 2; inset-block-end: 12px; inset-inline-end: max(12px, env(safe-area-inset-right));
  display: block; width: clamp(76px, 23vw, 104px); height: clamp(52px, 16vw, 74px); min-height: 44px;
  padding: 0; overflow: hidden; touch-action: manipulation; user-select: none;
  background: #111415; border: 1px solid #fff7; border-radius: 7px; box-shadow: 0 4px 17px #0008;
}
.viewer .photo-minimap:hover:not(:disabled) { background: #111415; border-color: #fffb; }
.viewer .photo-minimap:focus-visible { outline: 2px solid #ffecae; outline-offset: 3px; }
.photo-minimap .photo-map-image, .photo-minimap .photo-map-viewport {
  position: absolute; display: block; pointer-events: none;
}
.photo-minimap .photo-map-image {
  object-fit: fill; user-select: none; -webkit-user-drag: none;
}
.photo-minimap .photo-map-viewport {
  border: 1.5px solid #fffcf1; box-shadow: 0 0 0 1px #140d009c, 0 0 0 120px #0b0d0f70;
  border-radius: 2px;
}
.viewer-caption {
  display: grid; gap: 3px; margin: 0 auto; width: min(100%, 1080px); padding: 7px max(19px, env(safe-area-inset-left)) 9px;
  font-size: .98rem; min-width: 0; overflow-wrap: anywhere;
}
.viewer-caption small { color: #c3afa4; font-size: 10px; line-height: 1.5; letter-spacing: .1em; }
.viewer-caption p { color: #f4f0e8; font-size: clamp(16px, 4.4vw, 24px); font-weight: 600; line-height: 1.3; }
.vfoot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px; width: min(calc(100% - 24px), 1100px);
  margin: 0 auto; border-top: 1px solid #ffffff31; padding: 5px 0 max(8px, env(safe-area-inset-bottom));
}
.viewer-arrows, .viewer-actions { display: flex; gap: 2px; align-items: center; min-width: 0; }
.viewer-arrows button { min-width: 44px; padding: 0 10px; }
.viewer-actions { margin-left: auto; }
.viewer-actions button { white-space: nowrap; }
.viewer [aria-pressed="true"]#heart { color: #ffc4b8; }
.viewer #heart[aria-pressed="true"] svg { fill: currentColor; }
.viewer #download {
  position: relative; isolation: isolate;
  min-width: 44px; min-height: 44px; padding: 0 7px; gap: 4px;
  background: transparent; color: #202321; border-color: transparent;
  font-size: .79rem; font-weight: 660; line-height: 1.24; text-wrap: nowrap;
}
/* Shrink the painted chip, never the touch target. */
.viewer #download::before {
  content: ""; position: absolute; inset: 5px 1px; z-index: -1;
  background: #f0ede3; border-radius: inherit; pointer-events: none;
}
.viewer #download:hover:not(:disabled) { background: transparent; border-color: transparent; }
.viewer #download:hover:not(:disabled)::before { background: #fffdf6; }
.viewer #download svg { width: 14px; height: 14px; }
.viewer-note:empty { display: none; }
.viewer-note:not(:empty), #wx-result-view:not([hidden]) {
  max-width: 93%; margin: 5px auto 6px; color: #dfd7cb; text-align: center; font-size: .78rem; overflow-wrap: anywhere;
}
.vstate {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); max-width: 92%; font-size: .77rem;
  color: #faf5eb; background: #222722de; padding: 5px 10px; border-radius: 7px; text-align: center;
}

.album-panel {
  padding: 0; border: 0; border-radius: 18px; width: min(100% - 28px, 475px); max-width: 100%; max-height: min(89dvh, 780px);
  overflow: auto; overscroll-behavior: contain; background: var(--paper);
}
.album-panel[open] { animation: rise .18s ease-out; }
.album-sheet { padding: 10px 20px max(19px, env(safe-area-inset-bottom)); }
.album-sheet-handle { width: 32px; height: 4px; background: #bbb9af; border-radius: 8px; margin: 0 auto 8px; }
.album-sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.album-sheet-header h2 { margin: 0; color: var(--ink); font-size: 1.37rem; }
.album-sheet-header button { min-width: 44px; min-height: 44px; padding: 0 9px; background: transparent; border-color: transparent; }
.album-sheet .album-save-tip { font-size: .82rem; }
.album-sheet p { font-size: .91rem; line-height: 1.65; color: var(--muted); margin: 8px 0 13px; overflow-wrap: anywhere; }
.album-sheet a, .album-sheet button:not(.album-sheet-header button) { overflow-wrap: anywhere; }
.album-sheet #account button { min-height: 44px; }
.album-sheet #account:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr); }
.album-sheet #account img { width: 34px; height: 34px; }
.album-sheet .album-sheet-action, .album-sheet .action { width: 100%; min-height: 44px; }
.album-share-copy { min-width: 0; overflow-wrap: anywhere; }
.album-share-copy small { display: block; }
.album-sheet .album-share-card, .album-sheet .share-card {
  display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 9px;
}
.album-sheet .album-share-card img, .album-sheet .share-card img { width: 60px; height: 53px; object-fit: cover; border-radius: 4px; }
#save-image {
  display: block; width: auto; height: auto; max-width: 100%; max-height: 54dvh; object-fit: contain;
  margin: 10px auto; border-radius: 3px; -webkit-touch-callout: default; user-select: auto; -webkit-user-drag: auto;
}
@keyframes rise { from { opacity: .65; transform: translateY(11px); } to { opacity: 1; transform: translateY(0); } }

#resume-mask { display: none; }
.rechecking .album, .rechecking #viewer, .rechecking #album-panel { visibility: hidden; pointer-events: none; }
.rechecking #resume-mask { display: block; position: fixed; inset: 35% 0 auto; text-align: center; color: var(--muted); }

/* Photographer: event upstairs; upload, pick, and publish in a studio workspace. */
.studio-wrap { padding-top: 24px; }
.studio-wrap #back { min-height: 35px; padding: 5px 10px; border-color: transparent; background: transparent; color: var(--muted); }
.studio-wrap #back:hover:not(:disabled) { border-color: var(--line); color: var(--ink); }
.studio-header {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(249px, 31vw, 360px); align-items: center; gap: clamp(18px,4vw,42px);
  padding: 13px 0 30px;
}
.studio-hero-copy { min-width: 0; }
.studio-hero-copy h1 {
  margin: 7px 0; color: var(--ink); font: 600 clamp(35px, 4.4vw, 59px)/1.12 var(--serif);
  letter-spacing: -.025em; overflow-wrap: anywhere;
}
.studio-eyebrow { display: flex; align-items: center; gap: 9px; font-weight: 670; font-size: .72rem; letter-spacing: .08em; color: var(--muted); }
.studio-event-actions { margin-top: 13px; }
.studio-event-cover {
  position: relative; isolation: isolate; overflow: hidden; min-width: 0; border-radius: 11px;
  background: linear-gradient(140deg,#53594f,#303831 65%); color: #fff; min-height: 190px;
}
.studio-event-cover .cover-small {
  width: 100%; height: 100%; margin: 0; position: absolute; inset: 0; z-index: -2;
  object-fit: cover; object-position: center 53%;
}
.studio-event-cover::after { position: absolute; inset: 0; z-index: -1; content: ""; background: linear-gradient(0deg,#121511f0,transparent 61%); pointer-events: none; }
.studio-cover-caption {
  position: absolute; left: 13px; right: 13px; bottom: 11px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; font-size: .9rem;
}
.studio-cover-caption small, .studio-cover-caption .muted, .studio-cover-caption .meta { color: #f4ede1; display: block; }
.studio-cover-control {
  position: relative; display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid #ffffff88; border-radius: 6px; color: white; cursor: pointer;
  background: #202420c9; padding: 5px 9px; white-space: nowrap; font-size: .78rem;
}
.studio-cover-control:hover { background: #101411; }
.studio-cover-control:focus-within, .studio-upload:focus-within { outline: 2px solid #d98e75; outline-offset: 3px; }
.studio-event-qr { display: grid; grid-template-columns: clamp(116px, 36vw, 148px) minmax(0, 1fr); align-items: center; gap: 14px; margin-top: 16px; }
.studio-event-qr img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.studio-event-qr h2 { font-size: 1rem; margin: 0; }
.studio-event-qr .meta { margin: 5px 0 10px; }

.studio-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(230px, 22vw, 280px); gap: 19px; padding-top: 21px;
  margin-top: 0; border-top: 1px solid var(--line); align-items: start;
}
.studio-workspace, .studio-sidebar { min-width: 0; }
.studio-sidebar { display: flex; flex-direction: column; gap: 12px; }
.studio-sidebar .block { padding: 14px; }
.studio-sidebar .block h2 { font-size: 1rem; }
.studio-sidebar #more-queue { margin-top: 8px; }
.studio-grid-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 13px; }
.studio-grid-header h2 { font-size: 1.33rem; }
.studio-grid-header .meta { margin-top: 4px; }
.studio-upload { display: grid; justify-items: end; gap: 5px; }
.studio-upload > small { display: flex; flex-wrap: wrap; justify-content: flex-end; column-gap: 8px; row-gap: 2px; text-align: right; font-size: .72rem; }
.studio-upload > small > span, .studio-files-control > span { white-space: nowrap; }
.studio-upload label { width: max-content; max-width: 100%; }
.studio-files-control { position: relative; }
.studio-files-control input[type=file] {
  width: 100%; height: 100%; opacity: 0; cursor: inherit; position: absolute; inset: 0; padding: 0;
}
.studio-files-control:has(input:disabled) { opacity: .48; cursor: default; }
.studio-cover-control { position: absolute; right: 12px; bottom: 12px; }
.studio-cover-caption { display: block; padding-right: 94px; pointer-events: none; }
.studio-event-cover:not(.has-cover) { background: radial-gradient(ellipse at 75% 4%,#63675b,#353c36 55%,#252b26); }
.studio-queue .queue { margin-top: 7px; }
.studio-queue .studio-queue-item { display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.studio-queue .studio-queue-info { min-width: 0; border: 0; padding: 0; }
.studio-queue-info span { display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.studio-queue-state { display: block; }
.studio-queue-state[data-state="error"] { color: var(--red-dark); }
.studio-retry-control { border: 1px solid var(--line); border-radius: 6px; padding: 4px 7px; cursor: pointer; white-space: nowrap; }
.studio-sharing p { margin-top: 4px; }
.studio-progress:not(:empty) {
  border: 1px solid var(--line); padding: 8px 10px; background: #efede5; color: var(--green);
  border-radius: 8px; margin: 0 0 11px; line-height: 1.5; font-size: .83rem;
}
.studio-progress:empty { display: none; }
.studio-progress progress { accent-color: var(--green); min-height: 8px; width: min(100%,250px); vertical-align: middle; }
.studio-library { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; min-width: 0; }
.studio-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 0 13px;
  min-height: 48px; border-bottom: 1px solid var(--line);
}
.studio-toolbar .tabs { flex: 1; display: flex; flex-wrap: nowrap; overflow: auto; gap: 15px; margin: 0; }
.studio-toolbar .tabs button, .studio-toolbar .tabs button[aria-pressed="true"] {
  white-space: nowrap; min-height: 45px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent;
  border-radius: 0; background: none; color: var(--muted); font-size: .84rem; outline-offset: -2px;
}
.studio-toolbar .tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--red); font-weight: 680; }
.studio-toolbar .tabs button span { border: 1px solid var(--line); padding: 0 6px; border-radius: 12px; font: 11px/1.5 var(--mono); }
.studio-selection {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 43px; padding: 5px 13px;
  font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--line);
}
.studio-selection label { display: inline-flex; align-items: center; gap: 6px; }
.studio-selection-count { font-variant-numeric: tabular-nums; }
.studio-selection button { min-height: 32px; padding: 4px 8px; }
.studio-selection #review { margin-left: auto; }
.studio-selection #clear-selection { background: transparent; border-color: transparent; }
.studio-selection #clear-selection:hover:not(:disabled) { background: #eeeae2; }
.studio-library .tiles { margin: 0; padding: 13px; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.studio-library .tiles .empty { grid-column: 1 / -1; text-align: center; }
.studio-library #more-studio { display: flex; margin: 0 auto 12px; }
.studio-tile-asset { position: relative; min-width: 0; background: #dcd7cc; }
.studio-tile-asset a { display: block; overflow: hidden; }
.studio-tile-asset a:focus-visible { outline-offset: -3px; }
.studio-tile-asset img { aspect-ratio: 1.78; transition: transform 180ms; }
@media (hover:hover) { .studio-tile-asset a:hover img { transform: scale(1.035); } }
.studio-tile-badge {
  position: absolute; bottom: 6px; left: 6px; font-size: .68rem; font-weight: 680; line-height: 1;
  display: inline-flex; align-items: center; gap: 4px; background: #282a23e8; color: #fff; padding: 5px 6px; border-radius: 4px;
}
.studio-tile-badge::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.studio-tile-badge[data-state="live"], .studio-tile-badge.is-published { background: #244c37; }
.studio-tile-badge[data-state="failed"], .studio-tile-badge.is-failed { background: #863025; }
.studio-tile .studio-pick {
  position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0;
  border-radius: 5px; background: #fdfcf9f0; color: var(--ink);
}
.studio-pick input { display: block; margin: 0; }
.studio-tile.is-selected, .studio-tile:has(.studio-pick input:checked) { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.studio-tile .studio-tile-footer {
  min-height: 40px; display: flex; align-items: center; justify-content: space-between;
  gap: 5px; padding: 5px 7px; color: var(--ink); min-width: 0;
}
.studio-tile-footer > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.studio-tile-footer button { flex: none; }
.studio-tile-footer [data-withdraw], #offline { color: var(--red-dark); }
.studio-tile-footer [data-withdraw] { border: 0; background: transparent; }

@media (min-width: 600px) {
  .album { width: min(100% - 36px, 1080px); padding-top: 18px; }
  .album-hero { border-radius: 9px; }
  .album-inner { padding-inline: 1px; }
  .photos, .photo-row { gap: 7px; }
}
@media (max-width: 1000px) {
  .studio-library .tiles { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 850px) {
  .layout, .studio-layout { grid-template-columns: minmax(0,1fr); }
  .side, .studio-sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px,100%),1fr)); }
  .studio-event-cover { min-height: 169px; }
}
@media (max-width: 599px) {
  .album-panel { inset: auto 0 0; margin: 0; width: 100%; border-radius: 17px 17px 0 0; }
  .studio-header { grid-template-columns: minmax(0, 1fr); padding-bottom: 22px; }
  .studio-event-cover { min-height: 160px; }
}
@media (max-width: 450px) {
  .studio-grid-header { align-items: flex-start; }
  .studio-selection #review { margin-left: 0; }
  .brand { gap: 6px; }
  .brand small { display: none; }
  .login { margin-inline: 12px; padding: 20px; }
  .vfoot button, .vfoot a.action { font-size: .81rem; padding-inline: 9px; }
  .studio-library .tiles { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-height: 440px) and (orientation: landscape) {
  .vbar { padding-block: 0; }
  .viewer-caption { display: none; }
  .vfoot { padding-block: 0 max(2px,env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Public album: content-first hero, real browsing controls and audience-only overlays. */
.album.audience-enhanced {
  --audience-ink: #24231f;
  --audience-mute: #595953;
  --audience-border: #25292225;
  --audience-control: #f3f1ec;
  --audience-active: #26352e;
  color: var(--audience-ink);
}
.audience-enhanced .album-inner > * { scroll-margin-block-start: max(12px, env(safe-area-inset-top)); }
.audience-enhanced .album-hero {
  min-height: clamp(210px, 33svh, 355px);
  background: linear-gradient(140deg, #343c36, #1b241f);
}
.audience-enhanced .album-hero-shade {
  background: linear-gradient(180deg,#06090760,transparent 37%,#0b100d31 54%,#0b100de0 100%);
}
.album.audience-enhanced .intro {
  padding: 60px clamp(15px, 4.2vw, 38px) clamp(13px, 3.4vw, 24px);
}
.album.audience-enhanced .intro h1 {
  margin-top: 0; font-size: clamp(27px, 6.8vw, 53px); line-height: 1.11; letter-spacing: -.035em;
  text-wrap: balance;
}
.album.audience-enhanced .intro .meta { margin-top: 5px; font-size: clamp(.78rem, 2vw, .94rem); letter-spacing: .03em; }
.album.audience-enhanced:not(.audience-preview) .album-kicker { display: none; }
.album.audience-enhanced .album-kicker { margin-bottom: 5px; }
.album.audience-enhanced .album-top {
  left: max(clamp(15px, 4.2vw, 38px), env(safe-area-inset-left));
  right: max(clamp(11px, 3vw, 30px), env(safe-area-inset-right));
}
.album.audience-enhanced .gallery-head { min-height: 46px; align-items: center; gap: 8px; padding: 6px 0 3px; }
.album.audience-enhanced .gallery-head .album-order[hidden] { display: none; }
.album.audience-enhanced .album-section-title h2 {
  line-height: 1.24; font-size: clamp(17px, 4.5vw, 22px); letter-spacing: -.032em;
}
.album.audience-enhanced .album-section-title #total { color: var(--audience-mute); font-family: inherit; font-variant-numeric: tabular-nums; }
.audience-tools { margin: 0 0 7px; min-width: 0; }
.audience-tools [hidden], .audience-choice-sheet [hidden] { display: none !important; }
.audience-tool-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 3px; min-height: 44px;
}
.audience-tool-row > button, .audience-groups > button, .audience-enhanced #select-photos {
  appearance: none; min-width: 44px; min-height: 44px; flex: 0 0 auto; margin: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  color: var(--audience-ink); background: transparent; border: 1px solid transparent;
  padding: 0 clamp(5px, 1.4vw, 12px); border-radius: 9px; white-space: nowrap;
  font-weight: 620; font-size: clamp(.75rem, 2.6vw, .88rem);
  line-height: 1.2; touch-action: manipulation; transition: background-color 130ms ease-out, transform 130ms ease-out;
  -webkit-tap-highlight-color: transparent;
}
.audience-tool-row > button:hover:not(:disabled), .audience-groups > button:hover:not(:disabled),
.audience-enhanced #select-photos:hover:not(:disabled) { color: var(--audience-ink); background: #e7eae2; border-color: transparent; }
.audience-tool-row > button[aria-expanded="true"], .audience-tool-row > button[aria-pressed="true"],
.audience-groups > button[aria-pressed="true"] {
  color: var(--audience-active); background: #dce4da; border-color: #26352e1b;
}
.audience-tool-row > button[aria-pressed="true"] svg { fill: #26352e; }
.audience-tool-row > button:active:not(:disabled), .audience-groups > button:active:not(:disabled),
.audience-enhanced #select-photos:active:not(:disabled) {
  transform: scale(.965); background: #d4ddd0; transition: none;
}
.audience-tool-row svg, .audience-enhanced #select-photos svg { flex: 0 0 auto; width: 17px; height: 17px; }
.audience-tool-row > button[aria-haspopup] svg:last-child { width: 12px; height: 12px; opacity: .67; }
.audience-tool-row > button:focus-visible, .audience-groups > button:focus-visible,
.audience-enhanced #select-photos:focus-visible { outline: 2px solid #446f59; outline-offset: -2px; }
.audience-tool-row > button:is(:disabled,[aria-disabled="true"]),
.audience-groups > button:is(:disabled,[aria-disabled="true"]) { cursor: default; opacity: .57; }
.audience-groups {
  display: flex; align-items: stretch; gap: 4px; max-width: 100%;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: thin;
  padding-bottom: 4px; margin-bottom: 2px; border-bottom: 1px solid var(--audience-border);
}
.audience-groups > button { gap: 6px; max-width: min(245px, 70vw); }
.audience-group-name { overflow: hidden; text-overflow: ellipsis; }
.audience-group-count { font-size: .75em; color: var(--audience-mute); font-variant-numeric: tabular-nums; }
.audience-tool-message { margin: 6px 0; font-size: .83rem; line-height: 1.45; color: #855348; }

.audience-enhanced .photo img {
  transition: transform 110ms ease-out, filter 110ms ease-out;
}
.audience-enhanced .photo:active img { transform: scale(.987); filter: brightness(.93); transition: none; }
.audience-enhanced .photo:focus-visible { outline: 2px solid #708c79; outline-offset: -2px; }
.audience-enhanced #grid[data-layout="grid"] .photo-row {
  display: grid; grid-template-columns: repeat(var(--audience-square-columns, 2), minmax(0, 1fr)); width: 100%;
  align-items: stretch;
}
.audience-enhanced #grid[data-layout="grid"] .photo-row .photo {
  width: 100%; max-width: none; aspect-ratio: 1 !important; background: #eae9e2;
}
.audience-enhanced #grid[data-layout="grid"] .photo-row img { object-fit: contain; }
@media (min-width: 600px) {
  .audience-enhanced #grid[data-layout="grid"] { --audience-square-columns: 3; }
}
.audience-enhanced #grid[data-layout="single"] { --photo-row-height-cap: min(74svh, 790px); gap: 10px; }
.audience-enhanced #grid[data-layout="single"] .photo-row { justify-content: center; }
.audience-enhanced #grid[data-layout="single"] .photo-row > span[aria-hidden="true"] { display: none; }
.audience-enhanced #grid[data-layout="single"] .photo-row .photo { flex: 1 1 auto; }
.audience-enhanced #grid[data-layout="time"] :is(.audience-time-heading, .audience-day-label, .photo-time-label) {
  margin: 7px 0 1px; padding: 8px 1px 3px; border-top: 1px solid var(--audience-border);
  font-size: .9rem; font-weight: 670; color: var(--audience-ink); letter-spacing: -.02em;
}

.audience-dialog { color: var(--photo-ink); }
.audience-choice-sheet { padding-top: 10px; }
.album.audience-enhanced .album-inner { overflow-x: clip; }
.audience-dialog[open]:not([data-exiting]) { animation: photo-choice-enter 236ms cubic-bezier(.2,.72,.26,1) both; }
.album-panel.audience-dialog[open][data-exiting],
.album-panel.audience-dialog[open] > .audience-choice-sheet { animation: none; }
@keyframes photo-choice-enter {
  from { opacity: 0; transform: translateY(28px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .audience-dialog[open], .audience-dialog[open]:not([data-exiting]) { animation: none; }
}
.audience-choice-sheet .album-sheet-header h2 { font-size: 1.16rem; }
.audience-choice-sheet .album-sheet-header .audience-choice-close {
  color: var(--photo-ink); background: #e8e9e4; width: 44px;height: 44px; border: 0; border-radius: 100%;
  display: grid; place-items: center;
}
.audience-options { display: grid; gap: 4px; padding-bottom: 3px; }
.audience-choice-sheet .audience-option {
  display: flex; justify-content: space-between; align-items: center; min-height: 56px;
  color: var(--photo-ink); background: #f7f6f3; border: 1px solid #deded6; border-radius: 11px;
  text-align: start; padding: 8px 12px; gap: 8px; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.audience-choice-sheet .audience-option:hover, .audience-choice-sheet .audience-option[aria-pressed="true"] {
  color: #24382d; background: #e6ece4; border-color: #cbd7cc;
}
.audience-choice-sheet .audience-option:active { background: #d6e1d6; transition: none; }
/* Keep keyboard focus inside its own row, separate from the current choice. */
.audience-choice-sheet :is(.audience-option, .audience-choice-close):focus-visible {
  outline: 2px solid #547462;
  outline-offset: -3px;
}
.audience-option-copy { display: grid; min-width: 0; gap: 3px; }
.audience-option-copy strong { font-family: var(--audience-font); font-size: .95rem; font-weight: 500; }
.audience-option-copy small { color: var(--photo-muted); font-size: .79rem; font-weight: 400; line-height: 1.35; }
.audience-choice-sheet .audience-option:active small { color: var(--photo-ink); }
.audience-option-check { color: #325e45; width: 20px; height: 20px; flex: 0 0 auto; visibility: hidden; }
.audience-option[aria-pressed="true"] .audience-option-check { visibility: visible; }

#selection-bar[hidden] { display: none !important; }
#selection-bar:not([hidden]) {
  position: fixed; z-index: 4; inset-inline: 0; bottom: 0; margin: 0 auto;
  width: min(100%, 720px); min-height: 60px; display: grid; gap: 5px;
  grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  padding: 6px max(10px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background: #fbfaf6; color: var(--photo-ink); border: 1px solid #343f2e25; border-radius: 13px 13px 0 0;
  box-shadow: 0 -5px 22px #15191b16;
}
body:has(#selection-bar:not([hidden])) .audience-enhanced .album-inner { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
.audience-batch-count { min-width: 0; font-size: .84rem; line-height: 1.35; font-weight: 650; }
.audience-batch-actions, .audience-share-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.audience-batch-actions button { min-height: 44px; padding-inline: 8px; font-size: .81rem; }
.audience-share-actions > * { width: 100%; min-height: 44px; }
.audience-share-art { width: 61px; height: 53px; flex: 0 0 auto; object-fit: cover; border-radius: 5px; }
.audience-share-copy { min-width: 0; overflow-wrap: anywhere; }
.audience-share-status { min-width: 0; color: #526159; font-size: .82rem; overflow-wrap: anywhere; }
.audience-enhanced .photo.is-selected::after {
  content: '✓'; position: absolute; inset-block-start: 6px; inset-inline-end: 6px;
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: #285840; border: 1px solid #fff; color: #fff; font-size: .92rem; line-height: 1; font-weight: 700;
}
.audience-enhanced .photo.is-selected { box-shadow: inset 0 0 0 2px #315c45; }
.audience-enhanced .photo.is-selected img { opacity: .84; }
@media (max-width: 599px) {
  .album.audience-enhanced .album-hero { min-height: clamp(142px, 24svh, 231px); }
  .album.audience-enhanced .intro h1 { font-size: clamp(27px, 7.9vw, 43px); }
  .album.audience-enhanced .album-mark { letter-spacing: .03em; }
}
@media (max-width: 359px) {
  .audience-tool-row > button[aria-haspopup] svg:first-child { display: none; }
  .audience-tool-row { gap: 1px; }
  .viewer .viewer-caption { display: none; }
  .viewer .vfoot { flex-wrap: nowrap; gap: 2px; width: calc(100% - 14px); }
  .viewer .viewer-arrows, .viewer .viewer-actions { gap: 2px; }
  .viewer .viewer-arrows button, .viewer :is(#heart,#share-photo) { min-width: 44px; min-height: 44px; padding-inline: 5px; }
  .viewer :is(#heart,#share-photo) { width: 44px; position: relative; }
  .viewer :is(#like-label,#share-photo > span) {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .viewer #download { font-size: .74rem; }
}
@media (max-height: 450px) and (orientation: landscape) {
  .album.audience-enhanced .album-hero { min-height: max(115px, 29svh); }
  .album.audience-enhanced .intro { padding-top: 47px; }
  .album.audience-enhanced .intro h1 { font-size: clamp(24px, 5.3vw, 39px); }
}
@media (prefers-reduced-motion: reduce) {
  .audience-enhanced *, .audience-dialog *, #selection-bar * {
    transition: none !important; animation: none !important; scroll-behavior: auto !important;
  }
  .audience-enhanced .photo:active img, .audience-tool-row > button:active:not(:disabled),
  .audience-groups > button:active:not(:disabled) { transform: none; }
}

/* Keep viewer controls fixed while the selected photograph changes. */
.viewer .viewer-top-actions { justify-self:end; display:flex; gap:3px; align-items:center; }
.viewer #photo-options { min-width:44px; min-height:44px; font-size:1.2rem; }
.viewer #stop-slideshow { position:absolute; inset-inline-start:12px; inset-block-end:12px; min-height:44px; padding-inline:14px; z-index:2; }
@media (prefers-reduced-motion: reduce) {
  .viewer *, .audience-tools *, .audience-dialog * { scroll-behavior:auto !important; transition-duration:0s !important; animation-duration:0s !important; }
}

/* Viewer filmstrip: a single compact native horizontal rail below the image. */
.viewer .viewer-filmstrip {
  --film-thumb-width: clamp(48px, 12vw, 70px);
  --film-thumb-height: clamp(44px, 11vw, 53px);
  width: min(calc(100% - 20px), 1074px);
  margin-inline: auto;
  min-width: 0;
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  touch-action: pan-x pinch-zoom;
  scrollbar-width: thin;
  scrollbar-color: #d6d8d34d transparent;
  -webkit-overflow-scrolling: touch;
}
.viewer-filmstrip .viewer-strip-track {
  display: flex;
  align-items: center;
  width: max-content;
  min-width: 100%;
  gap: 6px;
  padding: 5px 5px 6px;
}
.viewer .viewer-filmstrip .viewer-strip-thumb {
  padding: 2px;
  flex: 0 0 var(--film-thumb-width);
  width: var(--film-thumb-width);
  height: var(--film-thumb-height);
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #ffffff31;
  border-radius: 6px;
  background: #252a27;
  opacity: .74;
  transition: opacity 140ms, border-color 140ms, background-color 140ms;
  overflow: hidden;
}
.viewer .viewer-filmstrip .viewer-strip-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 3px;
  user-select: none;
  -webkit-user-drag: none;
}
.viewer .viewer-filmstrip .viewer-strip-thumb[aria-current="true"] {
  opacity: 1;
  border-color: #fff4df;
  box-shadow: 0 0 0 1px #fff4df;
  background: #3d413c;
}
.viewer .viewer-filmstrip .viewer-strip-thumb:hover,
.viewer .viewer-filmstrip .viewer-strip-thumb:focus-visible { opacity: 1; }
.viewer .viewer-filmstrip .viewer-strip-thumb:focus-visible {
  outline: 2px solid #efaa85;
  outline-offset: 1px;
}
.viewer .viewer-filmstrip .viewer-strip-more {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 4px 9px;
  color: #e7e3da;
  font-size: 12px;
  border: 1px solid #ffffff42;
  border-radius: 6px;
  white-space: nowrap;
}
@media (max-height: 460px) and (orientation: landscape) {
  .viewer .viewer-filmstrip { --film-thumb-height: 44px; --film-thumb-width: 56px; }
  .viewer-filmstrip .viewer-strip-track { padding-block: 3px; }
}
.viewer:has(#stop-slideshow:not([hidden])) .viewer-filmstrip { --film-thumb-height: 44px; }
@media (prefers-reduced-motion: reduce) {
  .viewer .viewer-filmstrip .viewer-strip-thumb { transition: none; }
}
.viewer .viewer-filmstrip .viewer-strip-first {
  position: sticky;
  inset-inline-start: 4px;
  z-index: 1;
  flex: 0 0 auto;
  min-width: 48px;
  min-height: 44px;
  padding: 3px 8px;
  border: 1px solid #ffffff4d;
  border-radius: 6px;
  background: #282d2b;
  color: #faf4e8;
  white-space: nowrap;
  font-size: 12px;
}

/* Photo wall: compact corner dock; preserve full-width thumbnails and leave room at the end. */
.album.has-audience-dock { --dock-lift: 26px; --dock-rail: 56px; }
.audience-dock {
  position: fixed;
  z-index: 3;
  inset-inline-end: max(8px, env(safe-area-inset-right));
  inset-block-end: calc(max(8px, env(safe-area-inset-bottom)) + 4px + var(--dock-lift));
  display: grid;
  justify-items: end;
  color: var(--audience-ink, #252824);
  isolation: isolate;
}
.audience-dock[hidden], .audience-dock-item[hidden] { display: none !important; }
.audience-dock .audience-dock-toggle {
  width: var(--dock-rail); min-height: var(--dock-rail); padding: 4px 1px;
  display: grid; place-content: center; place-items: center; gap: 2px;
  border: 1px solid #43483e; border-radius: 15px; background: #242823;
  color: #fffdfa; box-shadow: 0 3px 11px #181b192b;
  font-size: .75rem; line-height: 1.2; font-weight: 650;
}
.audience-dock .audience-dock-toggle svg { width: 20px; height: 20px; }
.audience-dock .audience-dock-toggle:active, .audience-dock[data-open] .audience-dock-toggle {
  background: #3b4438; border-color: #686b5f;
}
.audience-dock-items {
  position: absolute;
  inset-inline-end: 0;
  inset-block-end: calc(100% + 8px);
  width: max-content;
  min-width: min(152px, 70vw);
  max-width: min(195px, calc(100vw - 35px));
  --dock-clearance: calc(38px + var(--dock-rail) + var(--dock-lift) + env(safe-area-inset-bottom) + env(safe-area-inset-top));
  max-height: clamp(44px, calc(100vh - var(--dock-clearance)), 322px);
  max-height: clamp(44px, calc(100dvh - var(--dock-clearance)), 322px);
  overflow: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 1px;
  padding: 5px;
  border: 1px solid #d8d8cc;
  border-radius: 14px;
  background: rgba(250, 249, 243, .89);
  box-shadow: 0 8px 26px #1417152e;
  opacity: 0; visibility: hidden; transform: translateY(6px) scale(.98);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 135ms ease, transform 150ms ease, visibility 0s linear 150ms;
}
.audience-dock[data-open] .audience-dock-items {
  opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s;
}
.audience-dock .audience-dock-item {
  min-height: 44px; width: 100%; justify-content: flex-start; padding: 6px 9px;
  text-align: start; white-space: nowrap; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--photo-ink); gap: 8px; font-size: .86rem; font-weight: 610;
}
.audience-dock .audience-dock-item[aria-pressed="true"] { background: #e5ece2; color: #244b36; }
.audience-dock .audience-dock-item svg { width: 18px; height: 18px; }
.audience-dock .audience-dock-item:focus-visible { outline-offset: -2px; }
@media (hover: hover) {
  .audience-dock .audience-dock-toggle:hover { background: #3b4438; color: #fffdfa; border-color: #686b5f; }
  .audience-dock .audience-dock-item:hover { background: #edeee6; color: var(--photo-ink); border-color: #e2e2d6; }
}
@media (max-width: 1215px) {
  .album.has-audience-dock .album-inner {
    padding-bottom: calc(27px + var(--dock-rail) + var(--dock-lift) + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  .audience-dock *, .audience-dock-items { transition: none !important; animation: none !important; }
}

/* Viewer polish: immediate press response and an unobtrusive playback dock. */
.viewer .viewer-shell { grid-template-columns: minmax(0, 1fr); }
.viewer .viewer-shell > * { min-width: 0; }
.viewer-shared-placeholder { background: #d9d8d0; border-radius: 3px; }
.viewer-transition-mask {
  position: fixed; z-index: 12; inset: 0; pointer-events: none;
  background: #161a19;
}
.viewer .stage .viewer-outgoing-frame {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  display: block; pointer-events: none; user-select: none;
  transform-origin: 0 0; z-index: 1;
}
.viewer .viewer-playback[hidden] { display: none !important; }
.viewer .viewer-playback {
  display: inline-flex; align-items: center; flex: 0 0 auto;
  margin: 0; border-radius: 999px; min-height: 44px; padding: 0;
  background: #2a332f; color: #f2f3ee; box-shadow: inset 0 0 0 1px #eef7ee2b;
}
.viewer .viewer-playback button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; gap: 3px; white-space: nowrap;
  font-size: .78rem; line-height: 1; font-weight: 640; padding-inline: 8px;
  color: #f5f5ee; background: transparent; border: 1px solid transparent;
}
.viewer .viewer-playback #viewer-play-toggle { background: #fff3d621; padding-inline: 9px; min-width: 56px; }
.viewer .viewer-playback #viewer-play-exit { color: #e2e5df; }
.viewer .viewer-playback #viewer-play-toggle:hover:not(:disabled),
.viewer .viewer-playback #viewer-play-toggle:focus-visible { background: #fff3d633; }
.viewer .viewer-playback-icon { display: inline-grid; place-items: center; }
.viewer .viewer-playback-icon svg { width: 13px; height: 13px; }
.viewer-playback-state {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
@media (max-width: 420px) {
  .viewer[data-playback] .vbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px; }
  .viewer[data-playback] .viewer-playback { justify-self: center; }
  .viewer[data-playback] #counter {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}

.audience-enhanced .album-top button, .audience-enhanced #new, .audience-enhanced #more, .audience-enhanced #latest,
.audience-enhanced #select-photos, .audience-tools button, .audience-dock button, .album-panel button, #selection-bar button,
.viewer button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 125ms cubic-bezier(.22,.66,.32,1), color 125ms cubic-bezier(.22,.66,.32,1),
              opacity 125ms cubic-bezier(.22,.66,.32,1), scale 125ms cubic-bezier(.22,.66,.32,1);
}
.audience-enhanced .album-top button:active:not(:disabled),
.audience-enhanced :is(#new,#more,#latest,#select-photos):active:not(:disabled),
.audience-tools button:active:not(:disabled), .audience-dock button:active:not(:disabled), .album-panel button:active:not(:disabled), #selection-bar button:active:not(:disabled),
.viewer button:active:not(:disabled) {
  scale: .974; opacity: .83; transition: none;
}
.audience-tools button:active:not(:disabled) { transform: none; }
.viewer #photo-minimap:active:not(:disabled) { scale: 1; }
.viewer .viewer-filmstrip .viewer-strip-thumb[aria-current="true"] { opacity: 1; }
.viewer .viewer-filmstrip .viewer-strip-thumb[aria-current="true"]:active { opacity: .82; }
.album-panel[open] > .album-sheet { animation: audience-sheet-enter 145ms cubic-bezier(.22,.66,.32,1) both; }
@keyframes audience-sheet-enter {
  from { opacity: .84; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .viewer-transition-mask { display: none !important; }
  .album-panel[open] > .album-sheet {
    animation: none !important;
  }
  .audience-enhanced .album-top button:active, .audience-enhanced :is(#new,#more,#latest,#select-photos):active,
  .audience-tools button:active, .audience-dock button:active, .album-panel button:active, #selection-bar button:active,
  .viewer button:active {
    scale: 1 !important; transition: none !important;
  }
}
.viewer .viewer-shell:has(.viewer-filmstrip) { grid-template-columns: minmax(0, 1fr); }

/* The independently scrolling filmstrip must never expand the dialog grid. */
.viewer .viewer-shell { grid-template-columns:minmax(0,1fr); min-width:0; max-width:100%; }
.viewer .viewer-footer { min-width:0; max-width:100%; }
.viewer .viewer-filmstrip { min-inline-size:0; max-inline-size:100%; width:100%; }

/* Audience editorial pass: a legible activity cover, a light index, and a dark viewer. */
.album.audience-enhanced, .audience-dialog, #album-panel, .viewer {
  --photo-page: #fcfcfa;
  --photo-surface: #fff;
  --photo-image-mat: #f3f4f1;
  --photo-ink: #434945;
  --photo-muted: #626862;
  --photo-view-text: #eceee8;
  --photo-view-muted: #ced3ce;
  --photo-line: #e6e8e3;
  --photo-accent: #2a604e;
  --photo-accent-deep: #214e3f;
  --photo-accent-soft: #e3eee7;
  --photo-accent-edge: #bed1c5;
  --photo-accent-on-dark: #b6dec8;
}
.album.audience-enhanced, .audience-dialog, #album-panel {
  --ink: var(--photo-ink);
  --muted: var(--photo-muted);
  color: var(--photo-ink);
}
.album.audience-enhanced {
  --audience-ink: var(--photo-ink);
  --audience-mute: var(--photo-muted);
  --audience-border: var(--photo-line);
  --audience-active: var(--photo-accent-deep);
  --photo-gutter: clamp(14px, 3.8vw, 28px);
  --photo-cover-height: clamp(116px, 39vw, 265px);
  background: var(--photo-page);
}
/* The thin side margins on desktop are part of the audience page, not the studio. */
body:has(.album.audience-enhanced) { background: #fcfcfa; }
.album.audience-enhanced #album-hero {
  display: grid;
  grid-template: "top" auto "title" auto / minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
  overflow: clip;
  background: var(--photo-surface);
  color: var(--photo-ink);
  border-radius: 0;
}
.album.audience-enhanced #album-hero.expects-cover {
  grid-template: "top" auto "cover" var(--photo-cover-height) "title" auto / minmax(0, 1fr);
}
.album.audience-enhanced #album-hero > :is(.banner, .album-hero-shade) {
  grid-area: cover;
  position: static;
  inset: auto;
  z-index: auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.album.audience-enhanced #album-hero > .banner {
  display: block;
  object-fit: contain;
  object-position: center;
  background: var(--photo-image-mat);
}
.album.audience-enhanced #album-hero > .album-hero-shade {
  z-index: 0;
  background: var(--photo-image-mat);
  display: none;
}
.album.audience-enhanced #album-hero.has-cover > .banner { z-index: 1; }
.album.audience-enhanced #album-hero.expects-cover > .album-hero-shade { display: block; }
.album.audience-enhanced #album-hero > .album-top {
  grid-area: top;
  position: static;
  inset: auto;
  min-height: 53px;
  padding: max(3px, env(safe-area-inset-top)) max(var(--photo-gutter), env(safe-area-inset-right))
           3px max(var(--photo-gutter), env(safe-area-inset-left));
  border-bottom: 1px solid var(--photo-line);
  color: var(--photo-ink);
}
.album.audience-enhanced .album-mark {
  text-shadow: none;
  color: var(--photo-ink);
  letter-spacing: .055em;
  font-size: .81rem;
}
.album.audience-enhanced .album-mark svg { color: var(--photo-accent); }
.album.audience-enhanced #share-button {
  min-width: 44px;
  min-height: 44px;
  gap: 5px;
  padding: 0 8px;
  color: var(--photo-ink);
  background: transparent;
  border-color: transparent;
  border-radius: 9px;
  font-size: .84rem;
  font-weight: 620;
}
.album.audience-enhanced #share-button svg { width: 17px; height: 17px; }
.album.audience-enhanced #share-button:active:not(:disabled) {
  background: var(--photo-accent-soft);
  color: var(--photo-accent-deep);
}
.album.audience-enhanced #profile-button { color: var(--photo-ink); }
.album.audience-enhanced #profile-button:not([hidden])::before {
  border-color: var(--photo-line);
  background: var(--photo-page);
}
.album.audience-enhanced #profile-button:hover:not(:disabled)::before { background: var(--photo-accent-soft); }
.album.audience-enhanced #album-hero > .intro {
  grid-area: title;
  position: static;
  min-width: 0;
  padding: clamp(12px, 3.4vw, 22px) max(var(--photo-gutter), env(safe-area-inset-right))
           clamp(8px, 2.5vw, 15px) max(var(--photo-gutter), env(safe-area-inset-left));
  background: var(--photo-page);
}
.album.audience-enhanced .intro h1 {
  color: var(--photo-ink);
  text-shadow: none;
  font-size: clamp(26px, 7.4vw, 42px);
  font-weight: 740;
  line-height: 1.13;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.album.audience-enhanced .intro .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px clamp(14px, 4.1vw, 22px);
  color: var(--photo-muted);
  margin-top: 8px;
  font-size: .85rem;
  font-weight: 465;
  line-height: 1.45;
  text-shadow: none;
  letter-spacing: 0;
}
.album.audience-enhanced .album-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
.album.audience-enhanced .album-meta-item > svg {
  align-self: start;
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: .15em;
}
.album.audience-enhanced .album-meta-item > time {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.album.audience-enhanced .album-kicker { color: var(--photo-accent-deep); }
.album.audience-enhanced .album-kicker::before { background: var(--photo-accent); }
.album.audience-enhanced .album-inner {
  padding-inline: max(var(--photo-gutter), env(safe-area-inset-left))
                  max(var(--photo-gutter), env(safe-area-inset-right));
}
.album.audience-enhanced .gallery-head { min-height: 36px; padding-block: 5px 0; }
.album.audience-enhanced .album-section-title h2 { font-weight: 690; font-size: clamp(17px, 4.5vw, 22px); }
.album.audience-enhanced .album-section-title #total { color: var(--photo-muted); font-size: .75rem; }
/* Public cover flows directly into a single metadata row. The headings remain
   available to assistive technology and the draft preview stays editorial. */
.album.audience-enhanced #album-hero > #title.visually-hidden { font: inherit; }
.album.audience-enhanced:not(.audience-preview) .gallery-head.audience-gallery-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  min-height: 0;
  padding-block: 10px 5px;
  color: var(--photo-muted);
  font-size: .82rem;
  line-height: 1.48;
}
.album.audience-enhanced .album-meta-details {
  display: flex;
  grid-column: 1;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px clamp(10px, 3.4vw, 18px);
  min-width: 0;
  margin: 0;
  color: inherit;
  font-size: inherit;
}
.album.audience-enhanced .album-meta-count {
  display: inline-flex;
  grid-column: 2;
  align-items: center;
  justify-self: end;
  gap: 5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.album.audience-enhanced .album-meta-count > svg { flex: none; width: 15px; height: 15px; }
.album.audience-enhanced .audience-tools { margin-bottom: 8px; }
.album.audience-enhanced .audience-tool-row { gap: 3px; padding-block: 0; }
.album.audience-enhanced .audience-tool-row > button {
  padding-inline: clamp(5px, 1.7vw, 13px);
  font-size: clamp(.72rem, 2.7vw, .86rem);
  min-height: 44px;
  color: var(--photo-ink);
}
.album.audience-enhanced .audience-tool-row > button:first-child { margin-inline-start: -5px; }
.album.audience-enhanced #select-photos {
  margin-inline-start: auto;
  color: var(--photo-muted);
  font-weight: 600;
}
.album.audience-enhanced #select-photos:active:not(:disabled),
.album.audience-enhanced .audience-groups button:active .audience-group-count { color: var(--photo-ink); }
/* Keep text opaque during a press; use scale and the control surface for feedback. */
.album.audience-enhanced :is(.album-top, .audience-tools, .audience-dock, #selection-bar) button:active:not(:disabled),
#album-panel button:active:not(:disabled), .viewer button:active:not(:disabled) { opacity: 1; }
.album.audience-enhanced .audience-tool-row > button[aria-expanded="true"],
.album.audience-enhanced .audience-tool-row > button[aria-pressed="true"],
.album.audience-enhanced .audience-groups > button[aria-pressed="true"] {
  background: var(--photo-accent-soft);
  color: var(--photo-accent-deep);
  border-color: var(--photo-accent-edge);
}
.album.audience-enhanced .audience-tool-row > button[aria-pressed="true"] svg { fill: currentColor; }
.album.audience-enhanced :is(.audience-tool-row, .audience-groups) > button:focus-visible,
.album.audience-enhanced #share-button:focus-visible,
.album.audience-enhanced .photo:focus-visible {
  outline-color: var(--photo-accent);
}
.album.audience-enhanced .photo {
  background: var(--photo-image-mat);
  border-radius: 4px;
}
.album.audience-enhanced #grid[data-layout="grid"] .photo-row .photo { background: var(--photo-image-mat); }
.album.audience-enhanced .notice.primary {
  color: #fff;
  background: var(--photo-accent-deep);
  border-color: var(--photo-accent);
}
.album.audience-enhanced .audience-dock-toggle {
  color: var(--photo-ink);
  background: rgba(255, 255, 255, .83);
  border-color: #cdd1c9;
  box-shadow: 0 2px 10px #181b1920;
}
.album.audience-enhanced .audience-dock[data-open] .audience-dock-toggle {
  color: var(--photo-accent-deep);
  background: rgba(227, 238, 231, .89);
  border-color: var(--photo-accent-edge);
}
.album.audience-enhanced .audience-dock-item[aria-pressed="true"] {
  color: var(--photo-accent-deep);
  background: var(--photo-accent-soft);
}
.audience-dialog .audience-option[aria-pressed="true"] {
  background: var(--photo-accent-soft);
  color: var(--photo-accent-deep);
  border-color: var(--photo-accent-edge);
}
.audience-dialog .audience-option-check { color: var(--photo-accent-deep); }
.viewer .viewer-filmstrip .viewer-strip-thumb[aria-current="true"] {
  border-color: var(--photo-accent-on-dark);
}
@media (hover: hover) {
  .album.audience-enhanced #share-button:hover:not(:disabled) {
    color: var(--photo-accent-deep);
    background: var(--photo-accent-soft);
    border-color: transparent;
  }
  .album.audience-enhanced .audience-dock-toggle:hover {
    color: var(--photo-accent-deep);
    background: rgba(227, 238, 231, .89);
    border-color: var(--photo-accent-edge);
  }
}
@media (max-height: 440px) and (orientation: landscape) {
  .album.audience-enhanced {
    --photo-cover-height: clamp(80px, 25vh, 115px);
    --photo-cover-height: clamp(80px, 25svh, 115px);
    padding-top: 0;
  }
  .album.audience-enhanced #album-hero > .album-top { min-height: 48px; padding-block: 1px; }
  .album.audience-enhanced #album-hero > .intro { padding-block: 8px; }
  .album.audience-enhanced .intro h1 { font-size: clamp(26px, 4.1vw, 31px); }
  .album.audience-enhanced .gallery-head { min-height: 32px; }
}

/* The scrim dims the live gallery behind the modal; never fade the photograph with it. */
.viewer { background: transparent; color: var(--photo-view-text); }
.viewer button, .viewer a.action, .viewer .viewer-caption p { color: var(--photo-view-text); }
.viewer #counter, .viewer .viewer-caption small, .viewer .viewer-note:not(:empty) { color: var(--photo-view-muted); }
.viewer #download, .viewer #download:hover:not(:disabled) { color: var(--photo-ink); }
#album-panel .audience-share-panel { --share-ink: var(--photo-ink); --share-muted: var(--photo-muted); }
#album-panel.audience-share-dialog .album-sheet-header #album-sheet-title { color: var(--photo-ink); }
.viewer::backdrop {
  background: rgba(9, 12, 11, .84);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.rechecking .viewer::backdrop {
  background: #101211;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
