:root {
  color: #513b32;
  background: #f6ecdf;
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --ink: #513b32;
  --muted: #766054;
  --accent: #994a4a;
  --line: #ddcbbf;
  --white: #fffaf3;
  --radius: 18px;
}

* { box-sizing: border-box; }
body {
  min-width: 280px;
  margin: 0;
  background: url("/static/miniapp/album/paper.jpg") repeat #f6ecdf;
  background-blend-mode: multiply;
}
[hidden] { display: none !important; }
h1, h2, p, figure { margin: 0; }

:focus-visible {
  outline: 3px solid #ab5b59;
  outline-offset: 3px;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }

.site-width { width: min(100% - 2.5rem, 1360px); margin-inline: auto; }

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent);
  color: white;
}

.access-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--muted);
  font-size: .8125rem;
}

.access-badge::before {
  content: "";
  flex: 0 0 6px;
  height: 6px;
  border-radius: 50%;
  background: #b77c72;
}

.access-badge.is-approved { color: var(--accent); background: #f9e6de; }

.gate {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  overflow: hidden;
  margin: clamp(40px, 9vw, 120px) auto;
  max-width: 980px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 22px 70px #65433616;
}

.gate-copy { min-width: 0; padding: clamp(24px, 5vw, 70px); }

.eyebrow {
  color: var(--accent);
  font: 700 .72rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .17em;
}

h1 {
  margin: 11px 0 12px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -.055em;
}

.gate h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
.gate-message, .gallery-intro > p:last-child { color: var(--muted); }
.gate-message { max-width: 32rem; }

#access-form {
  display: grid;
  justify-items: start;
  gap: 10px;
  margin-top: 24px;
}

#access-form label span { color: var(--muted); font-weight: 400; }
#access-form input { width: 100%; margin-bottom: 4px; }
#access-refresh { margin-top: 22px; }
#access-error { margin-top: 10px; }

.gate-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 340px;
  background: linear-gradient(156deg, #d8a696, #f4d4bc 57%, #c18b7e);
}

.art-frame {
  position: absolute;
  z-index: 2;
  inset: 21px;
  border: 1px solid #fefffcb3;
  border-radius: 7px;
}

.art-sun {
  position: absolute;
  top: 19%;
  right: 24%;
  width: 25%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff3cf;
}

.art-mountain {
  position: absolute;
  inset: 27% -10% 0;
  background: #b4776f;
  clip-path: polygon(0 69%, 21% 40%, 34% 47%, 56% 5%, 71% 31%, 78% 25%, 100% 63%, 100% 100%, 0 100%);
}

.art-shore {
  position: absolute;
  inset: 57% -12% -2%;
  background: linear-gradient(135deg, #9c615a, #744b46);
  clip-path: polygon(0 29%, 23% 14%, 47% 55%, 73% 38%, 100% 3%, 100% 100%, 0 100%);
}

.art-number {
  position: absolute;
  right: 34px;
  bottom: 29px;
  color: white;
  font: 600 .6875rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .13em;
}

input {
  display: block;
  min-width: 0;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #c8a99d;
  border-radius: 9px;
  color: var(--ink);
  background: var(--white);
}

label { color: var(--ink); font-size: .875rem; font-weight: 650; }

.primary-button, .secondary-button {
  min-height: 44px;
  padding: 8px 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: .9375rem;
  font-weight: 650;
}

.primary-button { background: var(--accent); color: white; }
.primary-button:hover { background: #78393a; }
.secondary-button { color: var(--accent); background: var(--white); border-color: #c8a99d; }
.secondary-button:hover { background: #f6e7df; }
.error-text { color: #922d22; font-size: .875rem; }

.gallery { padding: 17px 0 48px; }

.gallery-label { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.gallery h1 { max-width: min(40vw, 450px); margin: 0; overflow: hidden; text-overflow: ellipsis; font: 700 1.2rem/1.3 Georgia, "Songti SC", serif; letter-spacing: .04em; white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gallery-more { position: relative; z-index: 3; }
.gallery-more summary { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff7ed; list-style: none; cursor: pointer; font-size: .875rem; }
.gallery-more summary::-webkit-details-marker { display: none; }
.more-menu { position: absolute; right: 0; top: calc(100% + 7px); display: grid; min-width: 156px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); box-shadow: 0 8px 20px #65433620; }
.more-menu button { min-height: 44px; padding: 8px 12px; border: 0; border-radius: 6px; color: var(--ink); background: transparent; text-align: left; font-size: .9rem; }
.more-menu button:hover:enabled { background: #f4e4d8; }
.shared-info { max-width: 210px; padding: 8px; color: var(--muted); font-size: .75rem; }

.photo-count {
  color: var(--muted);
  font: 500 .8125rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: nowrap;
}

.view-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.gallery-label { margin-right: auto; }

.layout-switch {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f4e5da;
}

.layout-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 80px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-weight: 600;
  font-size: .875rem;
  transition: background .15s, color .15s;
}

.layout-switch button:hover { color: var(--ink); background: #f9eee4; }
.layout-switch button[aria-pressed="true"] { background: var(--white); color: var(--accent); border-color: #e3cfc4; box-shadow: 0 2px 5px #72453614; }
.layout-switch svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.layout-hint { color: var(--muted); font-size: .8125rem; }

.gallery-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 25px; }

.filters {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 14px;
}

.filters h2 { color: var(--muted); font-size: .8125rem; font-weight: 500; }
.category-filter { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .8125rem; font-weight: 500; }
.category-filter select {
  min-height: 44px;
  max-width: 200px;
  min-width: 105px;
  padding: 8px 28px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.time-filter { position: relative; }
.time-filter summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); cursor: pointer; list-style: none; font-size: .875rem; }
.time-filter summary::-webkit-details-marker { display: none; }
.time-filter .presets { position: absolute; top: calc(100% + 6px); left: 0; display: grid; width: 150px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); box-shadow: 0 8px 20px #65433620; }
.time-filter .presets button { text-align: left; }
.presets { display: flex; flex-wrap: wrap; gap: 5px; }

.presets button {
  min-height: 44px;
  padding: 7px 17px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: .875rem;
}

.presets button:hover { background: #f6e8df; }
.presets button[aria-pressed="true"] { background: #f2dad1; color: var(--accent); font-weight: 650; }
.date-filter { margin-left: auto; }
.date-filter summary { display: flex; align-items: center; gap: 20px; min-height: 44px; padding: 8px 12px; cursor: pointer; color: var(--ink); font-size: .875rem; border: 1px solid var(--line); border-radius: 8px; list-style: none; }
.date-filter summary::-webkit-details-marker { display: none; }
.date-filter[open] summary { background: var(--white); }
.date-filter[open] summary .date-chevron { transform: rotate(180deg); }
#date-filter-label { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-chevron { flex-shrink: 0; }

.range-form {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: min(320px, 100%);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
  box-shadow: 0 10px 35px #65433620;
}

.range-form input { width: 100%; }
.range-form label:not(:first-child) { margin-top: 5px; }
.range-form button { margin-top: 6px; }
.gallery-results, .timeline, .month-group { min-width: 0; }
.timeline:empty { display: none; }

.month-group { margin-bottom: 36px; }
.month-group:last-child { margin-bottom: 0; }
.month-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.month-title {
  padding: 7px 14px;
  border: 1px dashed #c69b8c;
  border-radius: 8px 11px 7px 10px;
  color: var(--accent);
  background: #fae9de;
  font: 700 1.08rem/1.35 Georgia, "Songti SC", serif;
  letter-spacing: .025em;
}
.rail-controls { display: flex; gap: 8px; }
.gallery[data-layout="grid"] .rail-controls { display: none; }

.rail-arrow {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--white);
  font-size: 1.25rem;
  line-height: 1;
}

.rail-arrow:hover:enabled { background: #f2dad1; border-color: #c79587; }
.rail-arrow:disabled { cursor: default; opacity: .32; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 23px 20px; padding: 5px 4px; }
.photo-card {
  position: relative;
  min-width: 0;
  padding: 10px 10px 13px;
  border: 1px solid #e6d3c4;
  border-radius: 3px;
  background: #fff9ee;
  box-shadow: 0 4px 9px #67463123;
}

.gallery[data-layout="grid"] .photo-card:nth-child(3n+1) { transform: rotate(-.65deg); }
.gallery[data-layout="grid"] .photo-card:nth-child(3n+2) { transform: rotate(.55deg); }
.selection-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; padding: 9px 11px; border: 1px solid #d3a79c; border-radius: 10px; background: #f7e2d9; }
.selection-toolbar p { margin-right: auto; font-size: .875rem; font-weight: 650; }
.selection-toolbar button { min-height: 44px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--ink); font-size: .8125rem; }
.selection-toolbar #share-open { border-color: var(--accent); background: var(--accent); color: white; }
.is-selecting .photo-button::after { content: ""; position: absolute; z-index: 1; top: 7px; right: 7px; display: grid; place-items: center; width: 25px; height: 25px; border: 2px solid #fff9ed; border-radius: 50%; background: #67463155; box-shadow: 0 1px 4px #49322133; color: white; font: 700 16px/1 sans-serif; }
.is-selecting .photo-button[aria-pressed="true"]::after { content: "✓"; background: var(--accent); }
.is-selecting .photo-card:has(.photo-button[aria-pressed="true"]) { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-card::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -6px;
  left: calc(50% - 28px);
  width: 56px;
  height: 14px;
  transform: rotate(-5deg);
  border-inline: 1px dashed #c9807566;
  background: #e8ab9dbb;
  pointer-events: none;
}

.photo-card:nth-child(even)::before { transform: rotate(5deg); background: #e1bc8fbb; }

.photo-button {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: #f2e0d3;
  color: var(--muted);
}

.photo-button:focus-visible { outline-offset: -4px; }
.photo-button img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
@media (hover: hover) { .photo-button:hover img { transform: scale(1.025); } }
.photo-button img, .photo-fallback { position: absolute; inset: 0; }
.photo-fallback { display: grid; place-items: center; padding: 8px; font-size: .875rem; }
.photo-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 2px 0; }
.photo-title { min-width: 0; font-size: .8125rem; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-caption time { flex-shrink: 0; color: var(--muted); font: .72rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }

.gallery[data-layout="horizontal"] .photo-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(260px, 38vw, 480px);
  grid-template-columns: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 3px;
  scrollbar-width: thin;
  scrollbar-color: #bf8f83 transparent;
  padding: 8px 4px 14px;
  gap: 18px;
}

.gallery[data-layout="horizontal"] .photo-card { scroll-snap-align: start; }
.gallery[data-layout="horizontal"] .photo-button { aspect-ratio: 3 / 2; }

.film-view {
  overflow: hidden;
  border: 1px solid #775348;
  border-radius: 16px;
  color: #fff3e4;
  background: #3e2d29;
  box-shadow: 0 18px 50px #39232022;
}

.film-stage { position: relative; padding: 20px 20px 0; }
.film-image-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(280px, 53dvh, 640px);
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: #2c201e;
  color: white;
  touch-action: pan-y pinch-zoom;
}

.film-image-button img { display: block; width: 100%; height: 100%; object-fit: contain; }
.film-open-hint { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 12px; padding: 6px 11px; background: #2c201ed9; border: 1px solid #ffffff35; border-radius: 6px; font-size: .75rem; }
.film-status { position: absolute; inset: 20px 20px 0; display: grid; place-items: center; pointer-events: none; color: #ead3bf; font-size: .875rem; }
.film-caption { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 24px; }
.film-description { min-width: 0; }
.film-label { color: #d2b6a4; font: .6rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .18em; margin-bottom: 6px; }
.film-description h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; font-weight: 500; }
.film-description time { color: #dfc7b4; font: .75rem/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; }
.film-navigation { display: flex; flex-shrink: 0; align-items: center; gap: 10px; }
.film-counter { color: #f2d9c0; font: .8125rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; margin-right: 12px; font-variant-numeric: tabular-nums; }
.film-view .rail-arrow, .lightbox .rail-arrow { border-color: #947368; background: transparent; color: #fff1dd; }
.film-view .rail-arrow:hover:enabled, .lightbox .rail-arrow:hover:enabled { background: #62473e; border-color: #d4a692; }

.film-strip {
  display: flex;
  position: relative;
  gap: 10px;
  overflow-x: auto;
  padding: 24px;
  border-top: 1px solid #806258;
  background-color: #2c201e;
  background-image: repeating-linear-gradient(90deg, transparent 0 10px, #af8979 10px 20px, transparent 20px 30px), repeating-linear-gradient(90deg, transparent 0 10px, #af8979 10px 20px, transparent 20px 30px);
  background-size: 100% 5px;
  background-position: left 7px, left calc(100% - 7px);
  background-repeat: no-repeat;
  scrollbar-width: thin;
  scrollbar-color: #a27868 #2c201e;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}

.film-thumb {
  position: relative;
  flex: 0 0 104px;
  height: 72px;
  padding: 3px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 4px;
  background: #594139;
  opacity: .62;
  scroll-snap-align: center;
}

.film-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 1px; }
.film-thumb[aria-current="true"] { border-color: #ffd4ad; opacity: 1; }
.film-thumb:hover { opacity: 1; }
.film-thumb span { position: absolute; bottom: 4px; left: 5px; padding: 0 4px; background: #2c201ecc; color: white; font: .625rem/1.6 ui-monospace, monospace; }
.film-thumb-fallback { color: #f2d9c0; }

.results-message { margin-top: 14px; padding: 32px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: var(--white); text-align: center; }
.results-message:first-child, .timeline:empty ~ .results-message { margin-top: 0; }
.results-actions { display: flex; justify-content: center; margin-top: 20px; }

.lightbox { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(18px, 3vw, 36px) clamp(14px, 4vw, 60px) calc(22px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; overflow: hidden; isolation: isolate; background: #16231c; color: #fff; color-scheme: dark; }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox::backdrop { background: #101b15ed; }
.lightbox-ambient { position: absolute; z-index: 0; inset: -70px; width: calc(100% + 140px); height: calc(100% + 140px); object-fit: cover; filter: blur(44px) saturate(.85) brightness(.65); transform: scale(1.06); pointer-events: none; }
.lightbox-shade { position: absolute; z-index: 1; inset: 0; background: #07120b30; pointer-events: none; }
.lightbox-toolbar { position: relative; z-index: 2; display: flex; flex: none; justify-content: space-between; align-items: center; gap: 16px; min-height: 52px; padding: 0 0 10px; border: 0; background: transparent; }
.lightbox-toolbar h2 { color: #fff; font-size: 14px; font-weight: 550; letter-spacing: .03em; overflow-wrap: anywhere; }
.lightbox-toolbar time { display: block; margin-top: 3px; color: #ffffff9c; font-size: 11px; font-variant-numeric: tabular-nums; }
.close-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #ffffff3d; border-radius: 50%; background: #ffffff12; color: #fff; }
.close-button:hover { background: #ffffff2e; }
.lightbox-body { position: relative; z-index: 2; display: flex; flex: 1; min-height: 0; align-items: center; justify-content: center; padding: 12px 22px; overflow: hidden; touch-action: pan-y pinch-zoom; user-select: none; }
.lightbox-frame { display: flex; flex-direction: column; align-items: center; max-width: min(1280px, 100%); margin: 0; padding: 0; border: 1px solid #ffffff38; border-radius: 20px; overflow: hidden; background: #17281a50; backdrop-filter: blur(26px); box-shadow: 0 26px 70px #00000045; }
.lightbox-frame:has(img[hidden]) { display: none; }
.lightbox-body img { display: block; width: auto; height: auto; max-width: min(1280px, calc(100vw - 144px)); max-height: max(90px, calc(100dvh - 380px)); border-radius: 19px 19px 12px 12px; object-fit: contain; }
.photo-watermark { display: grid; justify-items: center; gap: 5px; width: 100%; padding: 17px 24px 19px; color: #fff; text-align: center; }
.photo-watermark-camera { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; column-gap: 14px; line-height: 1.2; }
.photo-watermark-camera strong { font-family: Arial, Helvetica, sans-serif; font-size: 29px; font-weight: 750; letter-spacing: -.055em; }
.photo-watermark-camera span { font-size: 23px; font-weight: 450; letter-spacing: -.025em; }
.photo-watermark-lens { color: #ffffffc2; font-size: 10px; letter-spacing: .16em; }
.photo-watermark-exposure { max-width: 100%; margin-top: 4px; color: #ffffffe0; font-size: 11px; font-variant-numeric: tabular-nums; line-height: 1.7; overflow-wrap: anywhere; }
.lightbox-body > p { position: absolute; left: 16px; right: 16px; bottom: 5px; color: #ffffffbd; text-align: center; font-size: 12px; }
.lightbox .shooting-info { position: relative; z-index: 2; flex: none; align-self: center; width: min(640px, 100%); padding: 4px 0; border: 0; color: #ffffff9c; font-size: 11px; }
.lightbox .shooting-info summary { min-height: 30px; padding: 6px 0; cursor: pointer; }
.lightbox .shooting-info dl { max-height: 90px; margin: 0; padding: 10px 0; font-size: 11px; }
.lightbox:has(.shooting-info[open]) .lightbox-body img { max-height: max(80px, calc(100dvh - 480px)); }
.lightbox-navigation { position: relative; z-index: 2; display: grid; grid-template-columns: 44px minmax(40px, 1fr) auto 44px; align-items: center; gap: 16px; flex: none; align-self: center; width: min(640px, 100%); padding: 8px 0 0; }
.lightbox-navigation span { min-width: 3.5rem; text-align: center; color: #ffffffc7; font: 12px/1.6 ui-monospace, monospace; }
.lightbox-navigation .rail-arrow { width: 44px; height: 44px; border: 1px solid #ffffff38; border-radius: 50%; background: #ffffff14; color: #fff; }
.lightbox .lightbox-navigation .rail-arrow:hover:enabled, .lightbox .lightbox-navigation .rail-arrow:focus-visible { background: #ffffff2e; border-color: #ffffff8a; }
.lightbox input[type="range"] { width: 100%; height: 44px; margin: 0; accent-color: #fff; cursor: ew-resize; }
.lightbox .rail-arrow:disabled { cursor: default; opacity: .3; }
.lightbox-body.is-changing .lightbox-frame { animation: photo-reveal .3s ease both; }
@keyframes photo-reveal { from { opacity: .65; transform: translateX(12px) scale(.985); } to { opacity: 1; transform: translateX(0) scale(1); } }

.export-dialog {
  width: min(100% - 30px, 1000px);
  max-height: calc(100dvh - 30px);
  padding: 0;
  border: 1px solid #caab9b;
  border-radius: 16px;
  background: #fff6ec;
  color: var(--ink);
  box-shadow: 0 25px 70px #38201755;
}

.export-dialog::backdrop { background: #3d2421ba; }
.export-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
  background: #f8e5dc;
}

.export-header h2 { margin-top: 3px; font: 700 1.44rem/1.2 Georgia, "Songti SC", serif; }
.export-close {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: 1.4rem;
}

.export-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: start; gap: 20px; padding: 20px 22px 24px; }
.export-options { display: grid; gap: 10px; min-width: 0; }
.export-options label { font-weight: 650; }
.export-options input, .export-options select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #c8a99d;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
}

.export-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 10px; }
.export-fields > div { display: grid; gap: 7px; }
.export-selection { padding-top: 6px; }
#export-count { font-weight: 700; font-size: .9rem; }
.export-help { margin: 2px 0 9px; color: var(--muted); font-size: .8rem; }
.export-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 7px;
  max-height: min(31dvh, 290px);
  min-height: 79px;
  padding: 5px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9eae0;
}

.export-choice {
  position: relative;
  min-height: 66px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  border: 2px solid #e3c6b9;
  border-radius: 6px;
  background: #f1dacf;
  color: var(--ink);
}

.export-choice img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.export-choice[aria-pressed="true"] { border-color: var(--accent); }
.export-choice:disabled { cursor: default; }
.export-check {
  position: absolute;
  right: 4px;
  top: 4px;
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font: 700 13px/20px sans-serif;
}

.export-choice[aria-pressed="true"] .export-check { display: block; }
.export-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.export-preview { min-width: 0; text-align: center; }
.export-canvas {
  display: grid;
  place-items: center;
  min-height: 170px;
  padding: 24px;
  border: 1px solid #dcd5ca;
  border-radius: 12px;
  background: #eeebe4;
}

.export-canvas canvas { display: block; max-width: 100%; width: auto; height: auto; max-height: min(54dvh, 510px); object-fit: contain; border: 6px solid #fffdf9; box-shadow: 0 2px 3px #51433120, 4px 12px 20px -6px #51433140; }
.export-status { margin-top: 9px; color: var(--muted); font-size: .85rem; }

.share-dialog { width: min(100% - 24px, 540px); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid #caab9b; border-radius: 15px; background: #fff6ec; color: var(--ink); }
.share-dialog::backdrop { background: #3d2421ba; }
.share-content { padding: 18px; }
.share-form, .share-result { display: grid; gap: 10px; }
.share-form input, .share-form select, .share-result input { width: 100%; min-height: 44px; min-width: 0; padding: 8px 10px; border: 1px solid #c8a99d; border-radius: 8px; background: var(--white); color: var(--ink); font-size: 16px; }
.share-form > p:first-child { color: var(--muted); font-size: .875rem; }
.share-result > p, .share-status { color: var(--muted); font-size: .8125rem; }
.share-status { margin-top: 12px; }
.share-history-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; font-size: .8125rem; color: var(--muted); }
.share-history button { min-height: 44px; padding: 6px 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--ink); }
.share-row { display: grid; gap: 5px; padding: 12px 0; border-top: 1px solid var(--line); }
.share-row h3 { margin: 0; font-size: .9375rem; font-weight: 650; overflow-wrap: anywhere; }
.share-row p { color: var(--muted); font-size: .8125rem; }
.share-row-actions { display: flex; gap: 8px; }
.share-once { align-self: center; color: var(--muted); font-size: .75rem; }
.share-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; padding-top: 12px; font-size: .8125rem; }

@media (max-width: 740px) {
  .site-width { width: calc(100% - 32px); }
  .header-inner { min-height: 60px; }
  .gate { grid-template-columns: 1fr; margin-top: 28px; }
  .gate-art { min-height: 160px; }
  .art-sun { width: 58px; }
  .gallery { padding-top: 10px; }
  .photo-count { padding-top: 3px; font-size: .6875rem; }
  .view-toolbar { gap: 10px; padding-bottom: 14px; }
  .view-toolbar { flex-wrap: nowrap; gap: 6px; }
  .gallery h1 { font-size: 1rem; }
  .gallery h1 { max-width: 24vw; }
  .gallery-label { gap: 4px; flex-direction: column; }
  .layout-switch { padding: 2px; gap: 1px; }
  .layout-switch svg { display: none; }
  .gallery-more summary { padding-inline: 8px; gap: 3px; font-size: .8125rem; }
  .layout-switch button { min-width: 45px; padding-inline: 8px; font-size: .8125rem; }
  .filters { gap: 6px; padding-top: 8px; }
  .category-filter { gap: 4px; font-size: 0; }
  .category-filter select { max-width: 132px; min-width: 100px; }
  .time-filter summary { padding-inline: 9px; font-size: .8125rem; }
  .filters h2 { display: none; }
  .presets { gap: 0; }
  .presets button { padding-inline: 9px; font-size: .8125rem; }
  .date-filter summary { padding-inline: 9px; gap: 8px; font-size: .8125rem; }
  .gallery-layout { gap: 18px; }
  .month-heading { margin-bottom: 10px; }
  .month-title { font-size: 1rem; }
  .rail-controls { gap: 5px; }
  .month-group { margin-bottom: 26px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .photo-card { padding: 7px 7px 10px; }
  .photo-caption { display: grid; gap: 3px; padding-top: 8px; }
  .gallery[data-layout="horizontal"] .photo-grid { grid-auto-columns: 83%; gap: 12px; }
  .gallery[data-layout="horizontal"] .photo-caption { display: flex; }
  .film-view { border-radius: 12px; }
  .film-stage { padding: 10px 10px 0; }
  .film-image-button { height: clamp(260px, 44dvh, 440px); border-radius: 6px; }
  .film-status { inset: 10px 10px 0; }
  .film-caption { gap: 10px; flex-wrap: wrap; padding: 14px; }
  .film-description { flex: 1 1 150px; }
  .film-description h2 { font-size: .875rem; }
  .film-label { display: none; }
  .film-navigation { gap: 6px; margin-left: auto; }
  .film-counter { margin-right: 4px; font-size: .75rem; }
  .film-strip { padding: 23px 12px; gap: 8px; }
  .film-thumb { flex-basis: 84px; height: 62px; }
  .lightbox-toolbar h2 { font-size: .875rem; }
  .export-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .export-header { padding: 10px 13px; }
  .export-content { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 13px; }
  .export-canvas { min-height: 135px; }
  .export-canvas canvas { max-height: none; width: min(100%, 400px); }
  .selection-toolbar { gap: 5px; padding: 7px; }
  .selection-toolbar p { flex-basis: 100%; }
  .selection-toolbar button { flex: 1; padding-inline: 6px; }
  .share-content { padding: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.shooting-info { padding:10px 22px; font-size:13px; border-top:1px solid #ddd4c8; }
.shooting-info dl { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;max-height:140px;overflow:auto; }
.shooting-info dt { opacity:.7; }.shooting-info dd {margin:4px 0;overflow-wrap:anywhere;}
.wall-tools { display:flex;align-items:center;gap:12px;margin:8px 0 16px;font-size:13px;flex-wrap:wrap; }
.wall-tools button { min-width:44px;min-height:44px;border:1px solid #dacbbb;background:#fffaf2;border-radius:10px;cursor:pointer; }
/* A quiet, sunlit gallery with bevelled frames and warm paper mounts. */
.gallery[data-layout="wall"] .timeline {
  --wall-scale: 1;
  display: block;
  overflow: auto;
  height: 68vh;
  min-height: 400px;
  padding: 48px;
  border-radius: 16px;
  background-color: #eee9e0;
  background-image: radial-gradient(ellipse at 14% 8%, #fffdf6 0, transparent 54%), radial-gradient(ellipse at 88% 92%, #d9d2c666 0, transparent 55%), linear-gradient(120deg, #f5f1e9 0%, #ebe5da 100%);
  background-attachment: local;
  cursor: grab;
  overscroll-behavior: contain;
}
.gallery[data-layout="wall"] .month-group { display: contents; }
.gallery[data-layout="wall"] .month-heading { display: none; }
.gallery[data-layout="wall"] .photo-grid {
  position: relative;
  display: block;
  width: var(--wall-width, 100%);
  height: var(--wall-height, 600px);
  margin: var(--wall-top, 0px) auto 0;
  padding: 0;
  isolation: isolate;
}
.gallery[data-layout="wall"] .photo-card {
  position: absolute;
  left: var(--wall-x, 0px);
  top: var(--wall-y, 0px);
  width: var(--wall-width, 280px);
  height: var(--wall-height, 240px);
  margin: 0;
  padding: var(--wall-mat, 16px);
  border: 1px solid #cfc6b9;
  border-radius: 2px;
  background: linear-gradient(135deg, #fffefb, #f4f0e8);
  box-shadow: inset 0 0 0 3px #fffefa, inset 0 0 0 4px #e5dfd4, 1px 2px 2px #493d3029, 5px 10px 14px -6px #46392d38, 12px 24px 42px -16px #46392d40;
  transform: rotate(var(--wall-angle, -1deg));
  transition: box-shadow .3s, transform .3s;
}
.gallery[data-layout="wall"] .photo-card:nth-child(3n+2) {
  border-color: #bfa88b;
  box-shadow: inset 0 0 0 3px #d5c2a6, inset 0 0 0 4px #bda98d, inset 0 0 0 6px #f9f5ec, 1px 2px 2px #493d3029, 5px 10px 14px -6px #46392d38, 12px 24px 42px -16px #46392d40;
}
.gallery[data-layout="wall"] .photo-card .photo-button {
  height: var(--wall-imageHeight, 180px);
  aspect-ratio: auto;
  border-radius: 0;
  background: #e9e4da;
  box-shadow: 0 0 0 1px #d3c9ba;
}
.gallery[data-layout="wall"] .photo-button::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 1px 4px #352c3038;
}
.gallery[data-layout="wall"] .photo-button img { object-fit: contain; transform: none; }
.gallery[data-layout="wall"] .photo-caption {
  height: var(--wall-caption, 36px);
  padding: 0 1px;
  gap: 8px;
  align-items: center;
}
.gallery[data-layout="wall"] .photo-title { color: #655d53; font-size: calc(11px * var(--wall-type-scale, 1)); font-weight: 500; letter-spacing: .045em; }
.gallery[data-layout="wall"] .photo-caption time { color: #999083; font-size: calc(9px * var(--wall-type-scale, 1)); letter-spacing: .035em; }
.gallery[data-layout="wall"] .photo-card::before { display: none; }
@media (hover: hover) {
  .gallery[data-layout="wall"] .photo-card:hover { z-index: 2; transform: rotate(0deg) translateY(-4px); box-shadow: inset 0 0 0 3px #fffefa, inset 0 0 0 4px #e5dfd4, 2px 4px 5px #493d3026, 14px 28px 48px -12px #46392d45; }
}
.gallery[data-layout="wall"] .photo-card:focus-within { z-index: 3; }
@media (max-width: 600px) {
  .gallery[data-layout="wall"] .timeline { padding: 28px 22px 100px; height: 65vh; }
  .gallery[data-layout="wall"] .photo-caption { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; }
  .gallery[data-layout="wall"] .photo-title { max-width: 100%; font-size: 10px; line-height: 1.3; }
  .gallery[data-layout="wall"] .photo-caption time { font-size: 8px; line-height: 1.3; }
  .layout-switch { flex-wrap: wrap; }
}

/* Immersive wall fills the viewport; album tools stay available behind the dock. */
body.wall-immersive { overflow: hidden; background: #eee9e0; }
.wall-immersive .site-header { display: none; }
.wall-immersive .gallery[data-layout="wall"] .timeline {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  border-radius: 0;
  padding: clamp(42px, 5vh, 72px) clamp(26px, 5vw, 90px) 88px;
  box-sizing: border-box;
  scrollbar-width: none;
}
.wall-immersive .timeline::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, #7660440a 100%);
}
@media (max-width: 600px) {
  .wall-immersive .gallery[data-layout="wall"] .timeline { padding: max(32px, env(safe-area-inset-top)) 24px calc(100px + env(safe-area-inset-bottom)); }
}
.wall-immersive .timeline::-webkit-scrollbar {display:none;}
.wall-immersive .view-toolbar,.wall-immersive .filters {visibility:hidden;pointer-events:none;}
.wall-immersive.wall-settings-open .view-toolbar {visibility:visible;pointer-events:auto;position:fixed;z-index:12;top:max(16px,env(safe-area-inset-top));left:16px;right:16px;margin:0;padding:14px 18px;border-radius:18px;background:rgba(255,250,242,.88);backdrop-filter:blur(18px);box-shadow:0 8px 30px #32261918;flex-wrap:wrap;}
.wall-immersive.wall-settings-open .filters {visibility:visible;pointer-events:auto;position:fixed;z-index:11;top:110px;left:16px;right:16px;width:auto;padding:10px 16px;border-radius:16px;background:rgba(255,250,242,.88);backdrop-filter:blur(18px);}
.wall-immersive .wall-tools {position:fixed;z-index:15;left:max(18px,env(safe-area-inset-left));bottom:max(18px,env(safe-area-inset-bottom));display:flex;gap:2px;margin:0;padding:5px;border:1px solid #ffffff60;border-radius:17px;background:rgba(255,250,241,.35);backdrop-filter:blur(16px);box-shadow:0 4px 24px #33271912;transition:opacity .6s,transform .6s;}
.wall-immersive .wall-tools button {min-width:44px;min-height:44px;border:0;background:transparent;border-radius:12px;color:#59483d;font-size:15px;}
.wall-immersive .wall-tools button:hover,.wall-immersive .wall-tools button:focus-visible {background:#ffffff80;}
.wall-immersive .wall-tools output {min-width:43px;text-align:center;align-self:center;font-size:12px;color:#59483d;font-variant-numeric:tabular-nums;}
.wall-immersive .wall-tools.is-idle {opacity:0;transform:translateY(8px);pointer-events:none;}
.wall-controls-reveal {position:fixed;z-index:14;left:max(18px,env(safe-area-inset-left));bottom:max(18px,env(safe-area-inset-bottom));width:44px;height:44px;border:0;border-radius:50%;background:rgba(255,250,241,.22);color:#59483d80;cursor:pointer;}
.wall-controls-reveal:focus-visible {outline:2px solid #9e5450;}
.wall-immersive .results-message {position:fixed;z-index:4;top:42%;left:50%;transform:translate(-50%,-50%);max-width:80vw;width:max-content;background:#fffaf2d9;padding:18px;border-radius:14px;}
.wall-immersive .results-actions {position:fixed;z-index:6;right:20px;bottom:max(18px,env(safe-area-inset-bottom));}
.wall-immersive .selection-toolbar {position:fixed;z-index:13;bottom:85px;left:18px;right:18px;background:#fffaf2e6;}
@media(max-width:600px) {.wall-immersive.wall-settings-open .view-toolbar {gap:10px;}.wall-immersive.wall-settings-open .filters {top:155px;}.wall-immersive .wall-tools {left:12px;gap:0;}.wall-immersive .wall-tools button {padding:0 10px;}}
@media(prefers-reduced-motion:reduce) {.wall-immersive .wall-tools {transition:none;}}

/* Reference wall treatments. Tiles share the existing protected media cache. */
.wall-immersive .wall-tools select {
  min-width: 62px; height: 44px; padding: 0 6px; border: 0;
  border-radius: 10px; color: #59483d; background: transparent; font-size: 13px;
}
.wall-immersive .wall-tools { max-width: calc(100vw - 28px); flex-wrap: wrap; }
/* Keep the wake target outside the fading dock, so a reveal tap cannot hit −. */
.wall-controls-reveal { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 62px); }
@media (max-width: 340px) { .wall-controls-reveal { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 112px); } }
.gallery[data-layout="wall"][data-wall-style="stack"] .timeline { padding: 0; background: #efebe5; }
.gallery[data-layout="wall"][data-wall-style="stack"] .timeline::before { display: none; }
.gallery[data-layout="wall"][data-wall-style="stack"] .photo-grid { margin: 0; }
.gallery[data-layout="wall"][data-wall-style="stack"] .photo-card {
  z-index: var(--wall-depth, 1); border: 1px solid #fffdf9; border-radius: 0; background: #fffdf9;
  box-shadow: inset 0 0 0 1px #d9d4cb70, 0 2px 3px #51433126, 5px 13px 19px -6px #51433142;
  transition: left .45s ease, top .45s ease, width .45s ease, height .45s ease, padding .45s ease, transform .45s ease, box-shadow .25s;
}
.gallery[data-layout="wall"][data-wall-style="stack"] .photo-card[data-frame="acrylic"] {
  border: 1px solid #fff9; border-radius: 2px; background: #ffffff35;
  box-shadow: inset 0 0 0 1px #b4ac9c45, 0 1px 3px #51433115, 3px 12px 20px -6px #5143312e;
}
.gallery[data-layout="wall"][data-wall-style="stack"] .photo-card .photo-button {
  height: 100%; background: #dedfd3; box-shadow: 0 0 0 1px #a79d8e45;
}
.gallery[data-layout="wall"][data-wall-style="stack"] .photo-button::before { box-shadow: inset 0 1px 3px #352c3028; }
.gallery[data-layout="wall"][data-wall-style="stack"] .photo-caption { display: none; }
.gallery[data-layout="wall"][data-wall-style="stack"] .photo-button img { object-fit: cover; }
.gallery[data-layout="wall"][data-wall-style="stack"] .photo-card:focus-within { z-index: 30; }
@media (hover: hover) {
  .gallery[data-layout="wall"][data-wall-style="stack"] .photo-card:hover { z-index: 25; transform: rotate(0deg) translateY(-3px); }
}
.frame-fasteners { display: none; position: absolute; inset: max(2px, calc(var(--wall-mat, 16px) * .18)); pointer-events: none; background-image: url("/static/miniapp/album/frame-fastener.png"), url("/static/miniapp/album/frame-fastener.png"), url("/static/miniapp/album/frame-fastener.png"), url("/static/miniapp/album/frame-fastener.png"); background-repeat: no-repeat; background-position: left top, right top, left bottom, right bottom; background-size: var(--wall-pin, 12px) var(--wall-pin, 12px); }
.gallery[data-layout="wall"][data-wall-style="stack"] [data-frame="acrylic"] .frame-fasteners,
.lightbox[data-frame="acrylic"] .frame-fasteners { display: block; }

/* The canvas tools stay centred independently of panning and zooming. */
.wall-immersive .wall-tools { left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); flex-wrap: nowrap; gap: 3px; width: max-content; max-width: calc(100vw - 24px); padding: 6px 9px; border-radius: 19px; background: #fffaf1b8; box-shadow: 0 5px 28px #51433116; }
.wall-immersive .wall-tools.is-idle { transform: translate(-50%, 8px); }
.wall-tools-divider { height: 20px; width: 1px; margin: 0 4px; background: #c8c0b580; }
.wall-controls-reveal { left: 50%; transform: translateX(-50%); bottom: calc(max(20px, env(safe-area-inset-bottom)) + 64px); }
@media (max-width: 600px) {
  .wall-immersive .wall-tools { left: 50%; gap: 0; padding: 5px; border-radius: 16px; }
  .wall-immersive .wall-tools button { min-width: 44px; padding: 0 5px; font-size: 12px; }
  .wall-immersive .wall-tools output { min-width: 34px; font-size: 11px; }
  .wall-immersive .wall-tools select { min-width: 44px; width: 44px; padding: 0 1px; font-size: 12px; }
  .wall-tools-divider { margin: 0 3px; }
}
.wall-immersive .gallery[data-layout="wall"][data-wall-style="surround"] .timeline {
  padding: 0; overflow: hidden; background: #0c151a; perspective: 1100px;
  perspective-origin: 50% 48%; touch-action: none;
}
.gallery[data-layout="wall"][data-wall-style="surround"] .timeline::before { display: none; }
.gallery[data-layout="wall"][data-wall-style="surround"] .photo-grid {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  margin: 0; padding: 0; isolation: auto; transform-style: preserve-3d;
  transform: scale3d(var(--ring-scale, 1), var(--ring-scale, 1), 1) translateZ(var(--ring-camera, 600px)) rotateZ(-7deg) rotateX(-7deg) translateY(var(--ring-pan, 0px)) rotateY(var(--ring-yaw, -12deg));
  will-change: transform;
}
.gallery[data-layout="wall"][data-wall-style="surround"] .photo-card {
  left: 0; top: 0; width: var(--ring-tile-width, 350px); height: var(--ring-tile-height, 240px);
  padding: 3px; border: 1px solid #34424a; border-radius: 2px;
  background: #111b22; box-shadow: 0 5px 16px #0008; z-index: auto;
  backface-visibility: hidden; transition: none;
  transform: translate(-50%, -50%) rotateY(var(--ring-angle)) translateZ(var(--ring-radius)) translateY(var(--ring-row));
}
.gallery[data-layout="wall"][data-wall-style="surround"] .photo-card .photo-button {
  height: 100%; width: 100%; background: #17242d; box-shadow: none; border-radius: 0;
}
.gallery[data-layout="wall"][data-wall-style="surround"] .photo-button img { object-fit: cover; }
.gallery[data-layout="wall"][data-wall-style="surround"] .photo-button::before { box-shadow: inset 0 0 16px #0002; }
.gallery[data-layout="wall"][data-wall-style="surround"] .photo-caption { display: none; }
.gallery[data-layout="wall"][data-wall-style="surround"] .photo-card:focus-within { outline: 2px solid #e4c794; outline-offset: 3px; }
.wall-immersive[data-wall-style="surround"] { background: #0c151a; }
.wall-immersive[data-wall-style="surround"] .wall-tools { background: #15232b66; border-color: #ffffff25; box-shadow: 0 8px 24px #0003; }
.wall-immersive[data-wall-style="surround"] .wall-tools button,
.wall-immersive[data-wall-style="surround"] .wall-tools output,
.wall-immersive[data-wall-style="surround"] .wall-tools select { color: #edf2f4; }
.wall-immersive[data-wall-style="surround"] .wall-tools select option { background: #17232c; color: #edf2f4; }
.wall-immersive[data-wall-style="surround"] .wall-tools button:hover,
.wall-immersive[data-wall-style="surround"] .wall-tools button:focus-visible { background: #ffffff22; }
.wall-immersive[data-wall-style="surround"] .wall-controls-reveal { color: #e6eff399; background: #17232c44; }
@media (max-width: 600px) {
  .wall-immersive .gallery[data-layout="wall"][data-wall-style="surround"] .timeline { perspective: 650px; }
  .gallery[data-layout="wall"][data-wall-style="surround"] .photo-grid { transform: scale3d(var(--ring-scale, 1), var(--ring-scale, 1), 1) translateZ(var(--ring-camera, 450px)) rotateZ(-5deg) rotateX(-4deg) translateY(var(--ring-pan, 0px)) rotateY(var(--ring-yaw, -12deg)); }
  .wall-immersive[data-wall-style="surround"] .wall-tools button { min-width: 44px; padding: 0 5px; }
  .wall-immersive[data-wall-style="surround"] .wall-tools select { min-width: 58px; }
}
@media (max-width: 360px) {
  .wall-immersive .wall-tools { flex-wrap: wrap; justify-content: center; width: calc(100vw - 24px); }
  .wall-controls-reveal { bottom: calc(max(20px, env(safe-area-inset-bottom)) + 112px); }
}

/* A persistent horizontal scrubber sits below the independent canvas tools. */
.wall-scrubber { position: fixed; z-index: 15; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; display: grid; grid-template-columns: auto minmax(30px, 1fr) auto; align-items: center; gap: 16px; width: min(700px, calc(100vw - 48px)); min-height: 54px; padding: 5px 18px; border: 1px solid #ffffffb3; border-radius: 17px; background: #fffcf5ba; color: #796f61; backdrop-filter: blur(20px); transform: translateX(-50%); box-shadow: 0 5px 24px #5143310f; }
.wall-scrubber span { font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wall-scrubber input { width: 100%; min-width: 0; height: 44px; margin: 0; accent-color: #88735d; cursor: ew-resize; }
.wall-scrubber input:disabled { opacity: .35; cursor: default; }
.wall-immersive[data-wall-style="stack"] .wall-tools { bottom: calc(max(20px, env(safe-area-inset-bottom)) + 72px); flex-wrap: wrap; justify-content: center; }
.wall-immersive[data-wall-style="stack"] .wall-controls-reveal { bottom: calc(max(20px, env(safe-area-inset-bottom)) + 144px); }
.gallery[data-layout="wall"][data-wall-style="stack"] .timeline { touch-action: pan-x pan-y; overscroll-behavior: contain; }
.gallery[data-layout="wall"][data-wall-style="stack"] .photo-card { border-radius: 7px; box-shadow: 0 2px 3px #5143311c, 0 15px 32px -13px #5143314a; transition: left .55s cubic-bezier(.22,.75,.2,1), top .55s cubic-bezier(.22,.75,.2,1), width .35s ease, height .35s ease, padding .35s ease, transform .55s ease, box-shadow .25s; }
.gallery[data-layout="wall"][data-wall-style="stack"] .photo-card .photo-button { border-radius: 3px; }
@media (max-width: 600px) {
  .wall-scrubber { width: calc(100vw - 30px); gap: 10px; padding: 5px 12px; }
  .wall-scrubber span { font-size: 10px; }
  .lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; padding: max(12px, env(safe-area-inset-top)) 15px calc(18px + env(safe-area-inset-bottom)); border-radius: 0; }
  .lightbox-toolbar { padding: 0 0 6px; }
  .lightbox-toolbar h2 { font-size: 12px; }
  .lightbox-body { padding: 8px 0; }
  .lightbox-frame { border-radius: 16px; }
  .lightbox-body img { max-width: calc(100vw - 32px); max-height: max(100px, calc(100dvh - 330px)); border-radius: 15px 15px 10px 10px; }
  .photo-watermark { padding: 14px 16px 16px; gap: 4px; }
  .photo-watermark-camera strong { font-size: 25px; }
  .photo-watermark-camera span { font-size: 20px; }
  .photo-watermark-lens { font-size: 9px; }
  .photo-watermark-exposure { font-size: 10px; }
  .lightbox-navigation { gap: 10px; }
  .lightbox .shooting-info { padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox-body.is-changing .lightbox-frame { animation: none; }
}

/* Glass signature frame, with two alternate viewing treatments. */
.preview-style-picker { position:relative;z-index:2;display:flex;justify-content:center;gap:4px;flex:none; }
.preview-style-picker button { min-height:44px;padding:0 18px;border:1px solid transparent;border-radius:24px;background:transparent;color:#ffffffad;font-size:12px; }
.preview-style-picker button[aria-pressed="true"] { background:#ffffff26;border-color:#ffffff40;color:#fff; }
.lightbox-ambient { filter:blur(45px) saturate(.95) brightness(.85); }
.lightbox-shade { background:#10160b17; }
.lightbox-body { padding:12px 0; }
.lightbox .lightbox-frame { max-width:100%;border-radius:clamp(16px,2.8vw,44px);background:#ffffff20;border:1px solid #ffffff70;box-shadow:inset 0 0 0 1px #ffffff20,0 24px 60px #111b1626; }
.lightbox .lightbox-body #lightbox-image { display:block;flex:none;max-width:100%;max-height:none;object-fit:contain;border-radius:0 0 20px 20px; }
.lightbox .photo-watermark { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px clamp(16px,3vw,46px);min-height:88px;background:#e4e9d11a;box-shadow:inset 0 1px #ffffff2b;text-align:left; }
.photo-watermark-brand { min-width:0;flex-shrink:0; }
.lightbox .photo-watermark-camera { justify-content:flex-start;gap:14px; }
.lightbox .photo-watermark-camera strong { font-family:Georgia,'Times New Roman',serif;font-size:clamp(22px,2.1vw,36px);letter-spacing:.02em;font-weight:700; }
.lightbox .photo-watermark-camera span { border-left:1px solid currentColor;padding-left:14px;font-size:clamp(17px,1.7vw,29px);font-weight:400; }
.lightbox .photo-watermark-lens { margin:6px 0 0;font-size:clamp(9px,.85vw,14px);letter-spacing:.16em; }
.lightbox .photo-watermark-exposure { display:flex;justify-content:flex-end;flex-wrap:wrap;gap:12px;margin:0;font-size:clamp(11px,1.2vw,19px);line-height:1.4; }
.lightbox .photo-watermark-exposure[hidden] { display:none; }
.photo-exposure-item { display:flex;align-items:center;gap:8px;white-space:nowrap; }
.photo-exposure-item + .photo-exposure-item { border-left:1px solid #ffffff60;padding-left:12px; }
.lightbox .photo-exposure-item img,.lightbox-navigation img { width:22px;height:22px;max-height:none;filter:invert(1);border-radius:0; }
.lightbox-frame.is-narrow .photo-watermark { flex-direction:column;align-items:flex-start;padding:14px 16px;gap:10px; }
.lightbox-frame.is-narrow .photo-watermark-camera strong { font-size:22px; }
.lightbox-frame.is-narrow .photo-watermark-camera span { font-size:17px; }
.lightbox-frame.is-narrow .photo-watermark-lens { font-size:9px;letter-spacing:.09em; }
.lightbox-frame.is-narrow .photo-watermark-exposure { font-size:10px;gap:8px;justify-content:flex-start; }
.lightbox-frame.is-narrow .photo-exposure-item { gap:4px; }
.lightbox-frame.is-narrow .photo-exposure-item + .photo-exposure-item { padding-left:6px; }
.lightbox-frame.is-narrow .photo-exposure-item img { width:14px;height:14px; }
.lightbox[data-preview-style="classic"] .lightbox-frame { padding:11px 11px 0;border-radius:3px;background:#fffdf8;border-color:#fffdf8; }
.lightbox[data-preview-style="classic"] .photo-watermark { background:#fffdf8;color:#393b32;padding:18px 8px;box-shadow:none; }
.lightbox[data-preview-style="classic"] .photo-watermark-lens,.lightbox[data-preview-style="classic"] .photo-watermark-exposure { color:#626559; }
.lightbox[data-preview-style="classic"] .photo-exposure-item img { filter:none; }
.lightbox[data-preview-style="classic"] #lightbox-image { border-radius:0; }
.lightbox[data-preview-style="immersive"] { background:#111; }
.lightbox[data-preview-style="immersive"] .lightbox-ambient,.lightbox[data-preview-style="immersive"] .lightbox-shade,.lightbox[data-preview-style="immersive"] .photo-watermark { display:none; }
.lightbox[data-preview-style="immersive"] .lightbox-frame { border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none; }
.lightbox[data-preview-style="immersive"] #lightbox-image { border-radius:0; }
.wall-signature { display:none; }
.gallery[data-layout="wall"][data-wall-style="stack"] .wall-signature { display:flex;align-items:center;justify-content:center;position:absolute;bottom:var(--wall-mat);left:var(--wall-mat);right:var(--wall-mat);height:clamp(20px,2.7vw,38px);font-size:clamp(7px,.65vw,11px);letter-spacing:.06em;color:#686a5e;white-space:nowrap;pointer-events:none; }
.gallery[data-layout="wall"][data-wall-style="stack"] .photo-card { border-radius:7px;box-shadow:0 3px 6px #453a2917,0 16px 30px -12px #453a2933; }
.gallery[data-layout="wall"][data-wall-style="stack"] .photo-card .photo-button { height:calc(100% - clamp(20px,2.7vw,38px));border-radius:3px; }
.gallery[data-layout="wall"][data-wall-style="stack"] .photo-card[data-frame="acrylic"] { border-radius:7px;background:#ffffff55; }
@media(max-height:500px) { .lightbox { padding:6px 16px; }.lightbox-toolbar {min-height:44px;padding:0}.lightbox-toolbar time{display:none}.preview-style-picker{position:absolute;top:6px;left:25%;right:25%}.lightbox .shooting-info{display:none}.lightbox-navigation{padding:0}.lightbox .photo-watermark{min-height:46px;padding:8px 14px}.lightbox-body{padding:4px 0}.lightbox .photo-watermark-camera strong{font-size:18px}.lightbox .photo-watermark-camera span{font-size:15px}.lightbox .photo-watermark-lens{font-size:8px} }

@media(max-height:500px) { .lightbox .lightbox-frame.is-narrow .photo-watermark{padding:8px 12px;min-height:48px;gap:4px}.lightbox .lightbox-frame.is-narrow .photo-watermark-camera{flex-wrap:nowrap;gap:8px}.lightbox .lightbox-frame.is-narrow .photo-watermark-camera strong{font-size:18px}.lightbox .lightbox-frame.is-narrow .photo-watermark-camera span{font-size:14px;padding-left:8px}.lightbox .lightbox-frame.is-narrow .photo-watermark-lens{font-size:8px;white-space:nowrap} }
@media(min-width:1000px) {
  .lightbox .photo-watermark-camera strong { font-size:clamp(30px,2.5vw,46px); }
  .lightbox .photo-watermark-camera span { font-size:clamp(24px,1.9vw,35px); }
  .lightbox .photo-watermark-exposure { font-size:clamp(14px,1.5vw,26px);gap:18px; }
  .lightbox .photo-exposure-item img { width:26px;height:26px; }
  .lightbox-frame.is-narrow .photo-watermark-camera strong {font-size:22px;}
  .lightbox-frame.is-narrow .photo-watermark-camera span {font-size:17px;}
  .lightbox-frame.is-narrow .photo-watermark-exposure {font-size:10px;gap:8px;}
}
