/* =============================================================================
   Trip Gallery — warm, dark "golden hour" gallery. Chrome stays quiet so the
   photos carry the page. Serif display title + system sans for UI.
   ============================================================================= */

:root {
  --bg: #17130f;
  --bg-2: #201a14;
  --surface: #251e17;
  --surface-2: #2e2519;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f4ece1;
  --muted: #b0a08c;
  --muted-2: #8a7c6b;
  --accent: #e0a15a;
  --accent-hi: #efb877;
  --accent-ink: #2a1a08;
  --danger: #e07a5f;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* The [hidden] attribute MUST win over any display:grid/flex we set below —
   without this, author display rules override the UA's [hidden]{display:none}
   and the modal/lightbox/empty overlays render permanently. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(224, 161, 90, 0.16), transparent 60%),
    radial-gradient(900px 500px at 8% 4%, rgba(120, 96, 66, 0.14), transparent 55%),
    linear-gradient(180deg, #191510, var(--bg) 40%);
  background-attachment: fixed;
}

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding: 22px clamp(16px, 4vw, 44px) 18px;
  background: linear-gradient(180deg, rgba(23, 19, 15, 0.86), rgba(23, 19, 15, 0.66));
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { min-width: 0; }
.title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  letter-spacing: -0.015em;
  line-height: 1.02;
  text-wrap: balance;
  background: linear-gradient(92deg, #fbf3e6, #eaca9f 70%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  letter-spacing: 0.01em;
}

/* ---------- buttons ---------- */
.actions { display: flex; gap: 10px; flex-shrink: 0; }
.btn {
  appearance: none;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 11px 16px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: transform 0.14s ease, background 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}
.btn:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, 0.28); }
.btn:active { transform: scale(0.97); }
.btn .i { font-size: 1.05em; line-height: 1; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  color: var(--accent-ink);
  border-color: transparent;
  box-shadow: 0 8px 22px -8px rgba(224, 161, 90, 0.6);
}
.btn-primary:hover { filter: brightness(1.05); background: linear-gradient(180deg, var(--accent-hi), var(--accent)); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--muted); }
.btn-ghost:hover { color: var(--danger); border-color: var(--danger); background: rgba(224, 122, 95, 0.1); }

/* ---------- stats ---------- */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 16px clamp(16px, 4vw, 44px) 4px;
  color: var(--muted);
  font-size: 0.86rem;
}
.stats .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}
.stats .chip b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- toolbar: filters + tile size ---------- */
:root { --tile: 132px; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 10px clamp(16px, 4vw, 44px) 0;
}
.toolbar:empty { display: none; }
.tb-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip {
  appearance: none; font: inherit; cursor: pointer;
  font-size: 0.8rem; font-weight: 600;
  color: var(--muted); background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.fchip:hover { color: var(--text); border-color: var(--line-2); }
.fchip.on { color: var(--accent-ink); background: linear-gradient(180deg, var(--accent-hi), var(--accent)); border-color: transparent; }
.size-ctl { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.size-btn {
  appearance: none; font: inherit; cursor: pointer;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--muted); background: transparent; border: none; padding: 7px 12px;
}
.size-btn + .size-btn { border-inline-start: 1px solid var(--line); }
.size-btn.on { color: var(--accent-ink); background: linear-gradient(180deg, var(--accent-hi), var(--accent)); }

/* ---------- day-grouped photo rows ---------- */
.grid { padding: 12px clamp(16px, 4vw, 44px) 64px; }
.no-match { color: var(--muted); text-align: center; padding: 48px 0; }
.day { margin: 0 0 26px; }
.day-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 10px; padding-top: 6px;
}
.day-head h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--text); }
.day-count { color: var(--muted-2); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--tile), 1fr));
  gap: 6px;
}
.tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  cursor: zoom-in;
  transform: translateZ(0);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.24s ease, border-color 0.24s ease;
  animation: rise 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--bg-2);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.tile:hover img { transform: scale(1.045); }
/* always-visible info strip at the bottom of every card */
.tile-foot {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  padding: 22px 6px 6px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
  pointer-events: none;
}
.who-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 3px 9px;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.t-time {
  font-size: 0.64rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
html[data-tile='s'] .t-time { display: none; }
html[data-tile='s'] .who-pill { max-width: 92%; font-size: 0.62rem; }

/* selection mode */
.sel-mark {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: transparent;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(3px);
}
body.selecting .sel-mark { display: flex; }
body.selecting .tile { cursor: pointer; }
.tile.sel { outline: 3px solid var(--accent); outline-offset: -3px; }
.tile.sel .sel-mark { color: var(--accent-ink); background: var(--accent); border-color: var(--accent-hi); }
.tile.sel img { transform: scale(0.94); }

.selbar {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 56;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(37, 30, 23, 0.9);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 8px 10px 8px 16px;
  box-shadow: var(--shadow);
  animation: pop 0.22s ease both;
  max-width: calc(100vw - 20px);
}
.sel-count { font-size: 0.88rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.selbar .btn:disabled { opacity: 0.45; cursor: default; }
.fchip-select { border-style: dashed; }

/* album picker */
.modal-sm { width: min(420px, 100%); }
.alb-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.alb-opt { font-size: 0.9rem; padding: 9px 14px; }
.alb-empty { color: var(--muted); font-size: 0.86rem; margin: 4px 0 6px; }
.alb-new { display: flex; gap: 8px; }
.alb-new .input { flex: 1; }
.alb-clear { margin-top: 12px; width: 100%; justify-content: center; }
.tile .badge {
  position: absolute;
  top: 9px;
  left: 9px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  backdrop-filter: blur(4px);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .tile, .tile img { animation: none; transition: none; }
}

/* ---------- empty state ---------- */
.empty { display: grid; place-items: center; padding: 8vh 20px; }
.empty-card {
  text-align: center;
  max-width: 440px;
  padding: 40px 32px;
  border: 1px dashed var(--line-2);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
}
.empty-mark { font-size: 3rem; margin-bottom: 6px; }
.empty-card h2 { margin: 8px 0; font-family: var(--serif); font-weight: 600; }
.empty-card p { color: var(--muted); line-height: 1.6; margin: 0 0 22px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.66); backdrop-filter: blur(3px); }
.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 22px;
  animation: pop 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.35rem; }
.icon-btn {
  appearance: none; border: 1px solid var(--line); background: transparent; color: var(--muted);
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 1rem;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }

.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: 0.86rem; color: var(--muted); margin-bottom: 6px; }
.field-label em { color: var(--muted-2); font-style: normal; }
.input {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224, 161, 90, 0.18); }

.dropzone {
  border: 1.5px dashed var(--line-2);
  border-radius: 16px;
  padding: 30px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.drag {
  border-color: var(--accent); background: rgba(224, 161, 90, 0.08); outline: none;
}
.dz-mark { font-size: 2rem; color: var(--accent); }
.dz-title { margin: 8px 0 2px; font-weight: 700; }
.dz-sub { margin: 0; color: var(--muted); font-size: 0.88rem; }
.dz-sub .link { color: var(--accent-hi); text-decoration: underline; }

/* ---------- overall upload progress + floating pill ---------- */
.overall { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.overall:empty { display: none; }
.ov-info { display: flex; justify-content: space-between; gap: 10px; font-size: 0.86rem; font-weight: 600; }
.ov-bytes { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.ov-bar { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.ov-bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); transition: width 0.25s ease; }
.ov-bar > i.ok { background: #86c99a; }
.btn-retry { align-self: flex-start; border-color: var(--danger); color: var(--danger); background: rgba(224, 122, 95, 0.08); }

.pill {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 55;
  appearance: none; font: inherit; cursor: pointer;
  font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums;
  color: var(--accent-ink);
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  border: none; border-radius: 999px; padding: 12px 20px;
  box-shadow: 0 12px 34px -8px rgba(224, 161, 90, 0.65);
  animation: pop 0.25s ease both;
}

.queue { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.qrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 0.84rem; }
.qname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.qstat { font-variant-numeric: tabular-nums; color: var(--muted-2); font-size: 0.8rem; }
.qbar { grid-column: 1 / -1; height: 5px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.qbar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); transition: width 0.2s ease; }
.qrow.done .qstat { color: #86c99a; }
.qrow.err .qstat { color: var(--danger); }
.qrow.done .qbar > i { background: #86c99a; }
.qrow.err .qbar > i { background: var(--danger); }

.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.hint { color: var(--muted-2); font-size: 0.82rem; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(8, 6, 4, 0.94); }
.lb-stage {
  position: relative; margin: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  max-width: 94vw; max-height: 92vh;
}
.lb-media { display: flex; align-items: center; justify-content: center; max-width: 94vw; max-height: 80vh; }
.lb-media img, .lb-media video {
  max-width: 94vw; max-height: 80vh; width: auto; height: auto;
  border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); background: #000;
  animation: pop 0.22s ease both;
}
.lb-fallback { text-align: center; color: var(--muted); padding: 40px; }
.lb-fallback .big { font-size: 3rem; }
.lb-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap;
  width: min(94vw, 900px);
  background: rgba(37, 30, 23, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  border-radius: 14px; padding: 12px 16px;
}
.lb-info { min-width: 0; }
.lb-name { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.lb-sub { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.lb-buttons { display: flex; gap: 8px; }
.lb-close {
  position: absolute; top: 16px; right: 18px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.2rem;
  border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.4); color: #fff; cursor: pointer;
}
.lb-close:hover { background: rgba(0, 0, 0, 0.7); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; border-radius: 50%; font-size: 1.7rem; line-height: 1;
  border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.4); color: #fff; cursor: pointer;
}
.lb-nav:hover { background: rgba(0, 0, 0, 0.72); }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
a.btn { text-decoration: none; }

/* ---------- touch & phone polish ---------- */
button, .btn, .tile, .dropzone { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tile:active { transform: scale(0.97); }
.dz-touch { display: none; }

.lb-count {
  position: absolute; top: calc(20px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 2;
  color: #fff; font-size: 0.84rem; font-weight: 600; letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line);
  padding: 6px 13px; border-radius: 999px; font-variant-numeric: tabular-nums;
  backdrop-filter: blur(6px);
}
.lb-count:empty { display: none; }

/* swipe: JS translates .lb-media while dragging; pinch stays native */
.lightbox { touch-action: pinch-zoom; }
.lb-media { will-change: transform; transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease; }
.lb-media.dragging { transition: none; }
.lb-media img { -webkit-user-drag: none; }
.lb-stage, .lb-bar, .lb-nav, .lb-close, .lb-count { user-select: none; -webkit-user-select: none; }
.lb-media img, .lb-media video { max-height: 80dvh; }

/* real touch devices: swipe replaces the arrows, no sticky hover states */
@media (hover: none) and (pointer: coarse) {
  .lb-nav { display: none; }
  .tile:hover { transform: none; box-shadow: none; }
  .tile:hover img { transform: none; }
  .dz-mouse { display: none; }
  .dz-touch { display: inline; }
}

/* ---------- phone layout ---------- */
@media (max-width: 640px) {
  .top { padding: 12px 12px 10px; gap: 10px; }
  .title { font-size: 1.6rem; }
  .subtitle { font-size: 0.8rem; margin-top: 3px; }
  .actions { width: 100%; }
  .actions .btn { flex: 1; justify-content: center; padding: 11px 12px; }
  .stats { padding: 10px 12px 0; font-size: 0.8rem; }

  /* photos-app style: tight square rows, edge to edge */
  .grid { padding: 8px 8px calc(72px + env(safe-area-inset-bottom)); }
  .toolbar { padding: 8px 8px 0; }
  .day-grid { gap: 5px; }
  .day-head h2 { font-size: 1.02rem; }

  /* upload panel becomes a bottom sheet */
  .modal { place-items: end stretch; padding: 0; }
  .modal-backdrop { backdrop-filter: none; }
  .modal-card {
    width: 100%; max-width: none; max-height: 92dvh;
    border-radius: 22px 22px 0 0; border-bottom: none;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    animation: sheet 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .dropzone { padding: 24px 14px; }

  /* lightbox: media fills width, controls clear the notch/home bar */
  .lb-stage { max-width: 100vw; gap: 10px; }
  .lb-media, .lb-media img, .lb-media video { max-width: 100vw; max-height: 72dvh; }
  .lb-bar { width: calc(100vw - 16px); padding: 10px 12px; margin-bottom: calc(4px + env(safe-area-inset-bottom)); }
  .lb-buttons { width: 100%; }
  .lb-buttons .btn { flex: 1; justify-content: center; }
  .lb-close { top: calc(10px + env(safe-area-inset-top)); right: 10px; }
  .lb-name { max-width: 88vw; }
  .lb-nav { width: 44px; height: 44px; font-size: 1.4rem; }
}
@keyframes sheet { from { transform: translateY(48px); opacity: 0.4; } to { transform: none; opacity: 1; } }

/* ---------- passcode lock ---------- */
.lock {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(900px 480px at 78% -8%, rgba(224, 161, 90, 0.14), transparent 60%),
    linear-gradient(180deg, #191510, var(--bg) 45%);
}
.lock-card { text-align: center; width: min(360px, 100%); }
.lock-mark { font-size: 3.6rem; margin-bottom: 8px; }
.lock-card h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  background: linear-gradient(92deg, #fbf3e6, #eaca9f 70%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lock-sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 20px; }
.lock-form { display: flex; gap: 8px; }
.lock-form .input { flex: 1; text-align: center; font-weight: 700; letter-spacing: 0.12em; }
.lock-err { color: var(--danger); font-size: 0.86rem; margin: 12px 0 0; }

/* ---------- lightbox: immersive mode + slide + zoom ---------- */
.lightbox .lb-bar, .lightbox .lb-close, .lightbox .lb-count, .lightbox .lb-nav {
  transition: opacity 0.25s ease;
}
.lightbox.immersive .lb-bar,
.lightbox.immersive .lb-close,
.lightbox.immersive .lb-count,
.lightbox.immersive .lb-nav {
  opacity: 0;
  pointer-events: none;
}
.lb-media img { will-change: transform; }
.enter-next { animation: slide-next 0.3s cubic-bezier(0.16, 1, 0.3, 1) both; }
.enter-prev { animation: slide-prev 0.3s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes slide-next { from { transform: translateX(48px); opacity: 0.2; } to { transform: none; opacity: 1; } }
@keyframes slide-prev { from { transform: translateX(-48px); opacity: 0.2; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .enter-next, .enter-prev { animation: none; }
}

/* ---------- save-all wizard ---------- */
.save-prog { margin: 0 0 8px; font-size: 0.92rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.save-bar { margin-bottom: 14px; }
.save-note { color: var(--muted-2); font-size: 0.8rem; line-height: 1.5; margin: 12px 0 0; }
#saveNext { width: 100%; }

/* ---------- download choice sheet ---------- */
.dl-opts { display: flex; flex-direction: column; gap: 10px; }
.dl-opt { width: 100%; justify-content: center; flex-direction: column; gap: 2px; padding: 14px; }
.dl-note { font-size: 0.72rem; font-weight: 500; opacity: 0.75; }
