:root {
  --bg: #fbfaf8;
  --ink: #171717;
  --muted: #767671;
  --hairline: #e8e6e1;
  --accent: #4f7a5f;
  --tile-bg: #efece5;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Work Sans', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; }
img, video { max-width: 100%; display: block; }
button { font: inherit; }

.cover {
  text-align: center;
  padding: 72px 24px 40px;
  margin: 0 auto;
}
.cover .eyebrow {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 36px;
  opacity: 0;
  animation: coverFadeUp 0.8s ease 0.05s forwards;
}
.cover-photo {
  position: relative;
  max-width: 620px;
  margin: 0 auto 40px;
  background: var(--tile-bg);
  min-height: 60px;
  overflow: hidden;
  box-shadow: 0 40px 80px -20px rgba(23, 23, 23, 0.22);
  opacity: 0;
  transform: scale(1.035);
  animation: coverReveal 1.2s cubic-bezier(0.22, 0.8, 0.2, 1) 0.1s forwards;
}
.cover-photo img { width: 100%; display: block; }
.cover-fx-darken-layer { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.cover-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(28px, calc(var(--cover-width, 100vw) * 0.07), 64px);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0 0 16px;
  text-wrap: balance;
  color: var(--ink);
  opacity: 0;
  animation: coverFadeUp 0.9s ease 0.4s forwards;
}
.cover-date {
  color: var(--muted);
  font-size: 17px;
  margin: 0;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: coverFadeUp 0.9s ease 0.55s forwards;
}
@keyframes coverReveal { to { opacity: 1; transform: scale(1); } }
@keyframes coverFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .cover .eyebrow, .cover-photo, .cover-title, .cover-date { animation: none; opacity: 1; transform: none; }
}

.sticky-bar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 250, 248, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.sticky-bar-row {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 16px;
  padding: 14px 24px;
  color: var(--muted); font-size: 13px; letter-spacing: 0.04em;
}

.section-tabs {
  display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none;
  padding: 0 24px 14px; border-top: 1px solid var(--hairline);
  margin-top: -1px;
}
.section-tabs::-webkit-scrollbar { display: none; }
.section-tab {
  background: none; border: none; cursor: pointer; white-space: nowrap;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding: 12px 0 4px; border-bottom: 2px solid transparent;
  flex-shrink: 0;
}
.section-tab.active { color: var(--ink); border-bottom-color: var(--accent); }

.chapter { padding: 56px 24px 8px; text-align: center; }
.chapter-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 4vw, 32px); margin: 0 0 12px; color: var(--ink);
}
.chapter-text {
  max-width: 560px; margin: 0 auto 32px; color: var(--muted);
  font-size: 15px; line-height: 1.6; white-space: pre-line;
}

/* --- Design: font / cover layout / text alignment presets -------------- */
body[data-font="playfair"] .cover-title, body[data-font="playfair"] .chapter-title { font-family: 'Playfair Display', Georgia, serif; }
body[data-font="fraunces"] .cover-title, body[data-font="fraunces"] .chapter-title { font-family: 'Fraunces', serif; }
body[data-font="worksans"] .cover-title, body[data-font="worksans"] .chapter-title { font-family: 'Work Sans', sans-serif; text-transform: uppercase; letter-spacing: 0.06em; }
body[data-font="cormorant"] .cover-title, body[data-font="cormorant"] .chapter-title { font-family: 'Cormorant Garamond', serif; }
body[data-font="libre"] .cover-title, body[data-font="libre"] .chapter-title { font-family: 'Libre Caslon Display', serif; }
body[data-font="bodonimoda"] .cover-title, body[data-font="bodonimoda"] .chapter-title { font-family: 'Bodoni Moda', serif; }
body[data-font="italiana"] .cover-title, body[data-font="italiana"] .chapter-title { font-family: 'Italiana', serif; letter-spacing: 0.04em; }
body[data-font="librebaskerville"] .cover-title, body[data-font="librebaskerville"] .chapter-title { font-family: 'Libre Baskerville', serif; }
body[data-font="parisienne"] .cover-title, body[data-font="parisienne"] .chapter-title { font-family: 'Parisienne', cursive; }
body[data-font="montserrat"] .cover-title, body[data-font="montserrat"] .chapter-title { font-family: 'Montserrat', sans-serif; text-transform: uppercase; letter-spacing: 0.05em; }
body[data-font="custom"] .cover-title, body[data-font="custom"] .chapter-title { font-family: var(--custom-font, inherit); }

/* Script faces read as cursive handwriting and break when forced into all
   caps — the "romance" style keeps the couple's names in their natural
   upper/lowercase instead of the usual uppercase cover title. */
.cover.no-caps .cover-title { text-transform: none; }

.cover.align-left { text-align: left; }
.cover.align-left .cover-photo { margin-left: 0; }

.cover.layout-none .cover-photo { display: none; }

.cover.layout-overlay {
  position: relative; padding: 0; margin: 0 auto;
  aspect-ratio: var(--cover-ratio, 16 / 9);
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
.cover.layout-overlay .cover-photo { position: absolute; inset: 0; max-width: none; margin: 0; z-index: 0; }
.cover.layout-overlay .cover-photo img { width: 100%; height: 100%; object-fit: cover; }
.cover.layout-overlay::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.6) 100%);
}
.cover.layout-overlay .eyebrow,
.cover.layout-overlay .cover-title,
.cover.layout-overlay .cover-date { position: relative; z-index: 2; color: #fff; margin-bottom: 6px; }
.cover.layout-overlay { padding: 28px 32px 36px; }
.cover.layout-overlay.align-left { align-items: flex-start; }
.cover.layout-overlay:not(.align-left) { align-items: center; }

.viewer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  grid-auto-rows: 4px;
  gap: 3px;
  padding: 0 3px 80px;
}
@media (max-width: 640px) {
  .viewer-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 3px; gap: 2px; padding: 0 2px 60px; }
}

/* Stories picking mode: a stripped-down variant of the grid — no cover, no
   chapter descriptions, smaller tiles — so it reads as a different screen
   from the main gallery instead of the same page with checkboxes added. */
body.stories-picking .cover,
body.stories-picking .chapter-text {
  display: none;
}
body.stories-picking .chapter { padding-top: 32px; }
body.stories-picking .viewer-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
@media (max-width: 640px) {
  body.stories-picking .viewer-grid { grid-template-columns: repeat(2, 1fr); }
}
body.stories-picking .icon-btn {
  width: 26px; height: 26px;
}
body.stories-picking .icon-btn svg { width: 13px; height: 13px; }
body.stories-picking .tile-fav { display: none; }
body.stories-picking .tile .select-check {
  width: 22px; height: 22px; top: 6px; right: 6px;
}
body.stories-picking .tile .select-check::after { inset: 4px; }

.tile {
  position: relative;
  overflow: hidden;
  background: var(--tile-bg);
  cursor: pointer;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease, filter 0.35s ease;
}
.tile.revealed { opacity: 1; transform: none; }
.viewer-grid.dimmed .tile:not(.tile-hidden) { filter: brightness(0.82) saturate(0.7); }
.tile.tile-hidden { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .tile { opacity: 1; transform: none; transition: filter 0.35s ease; }
}

.tile img, .tile video {
  width: 100%; height: auto; display: block;
  transition: transform 0.5s ease, opacity 0.4s ease;
  opacity: 0;
}
.tile img.loaded, .tile video.loaded { opacity: 1; }
.tile:hover img, .tile:hover video { transform: scale(1.035); }
.tile::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.45) 100%);
  opacity: 0; transition: opacity 0.25s ease;
}
.tile:hover::after { opacity: 1; }
.tile .play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.tile .play-badge svg { width: 44px; height: 44px; opacity: 0.9; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); }

.tile-actions {
  position: absolute; bottom: 8px; left: 8px;
  display: flex; gap: 8px;
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.tile:hover .tile-actions, .tile-actions.on { opacity: 1; transform: none; }
.tile-fav {
  position: absolute; bottom: 8px; right: 8px; z-index: 2;
}
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(10,10,10,0.55); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer; text-decoration: none;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.fav.on { background: #c3564a; border-color: #c3564a; }
.icon-btn.fav.on svg { fill: #fff; }
.icon-btn.fav.pop { animation: heartPop 0.4s ease; }
@keyframes heartPop { 0% { transform: scale(1); } 45% { transform: scale(1.4); } 100% { transform: scale(1); } }

.sticky-bar .select-toggle {
  background: none; border: 1px solid var(--hairline); border-radius: 999px;
  padding: 6px 16px; font-size: 13px; color: var(--ink); cursor: pointer;
}
.sticky-bar .select-toggle.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.sticky-bar .stories-btn {
  background: var(--accent); color: #fff; border: none; border-radius: 999px;
  padding: 6px 16px; font-size: 13px; cursor: pointer; font-weight: 600;
}

.stories-modal {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(15, 14, 12, 0.72); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.stories-modal.on { opacity: 1; pointer-events: auto; }
.stories-panel {
  position: relative; width: min(1200px, 96vw); max-height: 94vh; overflow-y: auto;
  background: var(--bg); border-radius: 20px; padding: 40px 32px 32px;
  text-align: center; box-shadow: 0 40px 90px rgba(0,0,0,0.35);
  transform: translateY(16px) scale(0.98); transition: transform 0.3s ease;
}
.stories-modal.on .stories-panel { transform: none; }
.stories-panel h2 {
  font-family: 'Playfair Display', Georgia, serif; font-size: clamp(24px, 4vw, 32px);
  margin: 0 0 10px; color: var(--ink);
}
.stories-sub { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.stories-close {
  position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%;
  background: none; border: 1px solid var(--hairline); color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.stories-close svg { width: 16px; height: 16px; }
.stories-strip {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px 18px;
  margin-bottom: 16px;
}
.story-thumb { display: flex; flex-direction: column; gap: 8px; }
.story-thumb-preview {
  position: relative; aspect-ratio: 9/16; border-radius: 12px; overflow: hidden;
  background: var(--tile-bg);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}
.story-thumb-preview > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-drop-zone {
  position: absolute; cursor: grab;
  transition: background-color 0.15s ease, outline-color 0.15s ease;
  outline: 2px solid transparent; outline-offset: -2px;
}
.story-drop-zone.dragging { background: rgba(0,0,0,0.25); }
.story-drop-zone.drag-over { outline-color: var(--accent); }
.story-thumb-controls { display: flex; gap: 6px; justify-content: center; }
.story-toggle-btn {
  flex: 1; background: var(--accent); color: #fff; border: none; border-radius: 999px;
  padding: 6px 4px; font-size: 11px; font-weight: 600; cursor: pointer;
}
.story-toggle-btn.off { background: none; color: var(--muted); border: 1px solid var(--hairline); text-decoration: line-through; }
.stories-hint { color: var(--muted); font-size: 12px; margin: 0 0 20px; }
.stories-download {
  background: var(--ink); color: #fff; border: none; border-radius: 999px;
  padding: 14px 32px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.stories-download:disabled { opacity: 0.5; cursor: default; }

.tile.select-mode { cursor: pointer; }
.tile .select-check {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%;
  background-color: rgba(255,255,255,0.85); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
  z-index: 3;
}
.tile .select-check::after {
  content: ''; position: absolute; inset: 5px;
  background-color: #171717;
  -webkit-mask-image: url('/toast-mark.png'); mask-image: url('/toast-mark.png');
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.tile.selected .select-check { background-color: var(--accent); border-color: var(--accent); }
.tile.selected .select-check::after { background-color: #fff; }
.tile.selected { outline: 3px solid var(--accent); outline-offset: -3px; }

.client-select-bar {
  position: fixed; left: 50%; bottom: 20px; z-index: 70;
  transform: translateX(-50%) translateY(140%);
  display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.25);
  transition: transform 0.3s ease;
  font-size: 13px; white-space: nowrap;
}
.client-select-bar.on { transform: translateX(-50%) translateY(0); }
.client-select-bar button {
  background: var(--accent); color: #fff; border: none; border-radius: 999px;
  padding: 8px 16px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.client-select-bar button.ghost { background: rgba(255,255,255,0.15); font-weight: 400; }

.viewer-empty {
  text-align: center; color: var(--muted); padding: 80px 24px; font-size: 15px;
}

/* Focus mode — clicking a tile grows it toward the center while the rest of
   the grid dims, instead of a full-screen takeover. */
.focus-scrim {
  position: fixed; inset: 0; background: rgba(251, 250, 248, 0.82); backdrop-filter: blur(2px);
  opacity: 0; z-index: 80; transition: opacity 0.35s ease; pointer-events: none;
}
.focus-scrim.on { opacity: 1; pointer-events: auto; cursor: zoom-out; }

.focus-clone {
  position: fixed; z-index: 90; overflow: hidden;
  border-radius: 3px; box-shadow: 0 30px 70px rgba(23, 23, 23, 0.18);
  transition: top 0.45s cubic-bezier(0.22, 0.8, 0.25, 1), left 0.45s cubic-bezier(0.22, 0.8, 0.25, 1),
    width 0.45s cubic-bezier(0.22, 0.8, 0.25, 1), height 0.45s cubic-bezier(0.22, 0.8, 0.25, 1),
    border-radius 0.45s ease;
}
.focus-clone img, .focus-clone video {
  width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.15s ease;
}
.focus-clone.settled { background: #f1efe9; border-radius: 6px; }
.focus-clone.settled img, .focus-clone.settled video { object-fit: contain; }

.focus-nav {
  position: fixed; z-index: 91; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(23, 23, 23, 0.75); border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; transition: opacity 0.25s ease; top: 50%; transform: translateY(-50%);
}
.focus-nav.prev { left: 16px; }
.focus-nav.next { right: 16px; }
.focus-nav.on { opacity: 1; }
.focus-nav svg { width: 18px; height: 18px; }

.focus-panel {
  position: fixed; z-index: 91; display: flex; gap: 8px; align-items: center;
  background: rgba(23, 22, 20, 0.88); backdrop-filter: blur(6px);
  padding: 8px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.1);
  opacity: 0; transform: translate(-50%, 6px); transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none; left: 0; top: 0;
}
.focus-panel.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.focus-panel .icon-btn { width: 38px; height: 38px; }
.focus-panel .icon-btn.web { font-family: 'Space Mono', monospace; font-size: 10px; width: auto; padding: 0 12px; border-radius: 999px; }
.focus-panel .icon-btn.note.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.focus-close {
  position: fixed; z-index: 91; top: 20px; right: 24px; color: var(--ink); font-size: 22px;
  background: none; border: none; cursor: pointer; opacity: 0; transition: opacity 0.25s ease;
}
.focus-close.on { opacity: 1; }

.note-popover {
  position: fixed; z-index: 92; width: 260px; background: #fff;
  border: 1px solid var(--hairline); border-radius: 14px; padding: 14px;
  box-shadow: 0 12px 30px rgba(23,23,23,0.1);
  transform-origin: bottom center;
}
.note-popover textarea {
  width: 100%; min-height: 72px; background: var(--bg); color: var(--ink);
  border: 1px solid var(--hairline); border-radius: 8px; padding: 8px 10px;
  font: inherit; font-size: 13px; resize: vertical;
}
.note-popover .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.note-popover button {
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 6px 14px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.note-popover button.ghost { background: none; color: var(--muted); }

.stories-loading { width: 100%; text-align: center; color: var(--muted); font-size: 13px; padding: 40px 0; }
.note-dot {
  position: absolute; top: 6px; left: 6px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px rgba(255,255,255,0.7);
}

/* Wordmark: Bread · toast · butter */
.wm { font-family: 'Playfair Display', Georgia, serif; font-weight: 900; text-transform: none; letter-spacing: -0.01em; line-height: 1; white-space: nowrap; font-style: normal; }
.wm .toast { display: inline-block; width: .98em; height: .98em; margin: 0 .05em; vertical-align: -.075em; background: currentColor; -webkit-mask: url(/toast-line.png) center/contain no-repeat; mask: url(/toast-line.png) center/contain no-repeat; }

.magazine-panel { width: min(440px, 96vw); }
.magazine-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.magazine-form input {
  font: inherit; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 10px;
  background: #fff; color: var(--ink);
}
.magazine-note { color: var(--muted); font-size: 12px; margin: 0; }
.magazine-error { color: #b3402f; font-size: 13px; margin: 0; min-height: 1em; }
.magazine-form .stories-download { align-self: center; margin-top: 4px; }
.client-select-bar button:disabled { opacity: 0.45; cursor: default; }

/* Polaroid table (gallery setting viewMode: 'polaroid') */
.polaroid-wrap { padding: 0 0 80px; }
.table-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; color: var(--muted); font-size: 13px; line-height: 1.4;
}
.table-tidy {
  flex-shrink: 0; background: none; border: 1px solid var(--hairline); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; color: var(--ink); cursor: pointer;
}
.polaroid-table {
  position: relative; isolation: isolate; overflow: hidden; touch-action: pan-y;
  background-color: #d9d1c3;
  background-image:
    radial-gradient(ellipse at 50% 25%, rgba(255, 255, 255, 0.38), transparent 65%),
    radial-gradient(ellipse at 50% 115%, rgba(60, 40, 20, 0.26), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .27 0 0 0 0 .18 0 0 0 .2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: inset 0 14px 30px -14px rgba(40, 25, 10, 0.35), inset 0 -14px 30px -14px rgba(40, 25, 10, 0.35);
}
.polaroid-table.tidying .polaroid { transition: transform 0.7s cubic-bezier(0.22, 0.8, 0.25, 1), box-shadow 0.2s ease, filter 0.35s ease, scale 0.2s ease; }
.polaroid {
  position: absolute; top: 0; left: 0;
  background: #fdfcf9; padding: 1em 1em 3.4em;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.18), 0 8px 18px -4px rgba(40, 25, 10, 0.38), 0 22px 40px -18px rgba(40, 25, 10, 0.3);
  cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  will-change: transform;
  transition: box-shadow 0.2s ease, filter 0.35s ease, scale 0.2s ease;
}
.polaroid:not(.landed) { opacity: 0; }
.polaroid.lifted {
  cursor: grabbing; scale: 1.06;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.16), 0 18px 34px -6px rgba(40, 25, 10, 0.45), 0 34px 60px -20px rgba(40, 25, 10, 0.4);
}
.polaroid-table.dimmed .polaroid { filter: brightness(0.82) saturate(0.7); }
.polaroid .tile { cursor: inherit; border-radius: 1px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.polaroid .tile:not(.ready) { aspect-ratio: 4 / 5; }
.polaroid .tile:hover img, .polaroid .tile:hover video { transform: none; }
.polaroid.taped::before {
  content: ''; position: absolute; z-index: 3; top: -0.7em; left: 50%; width: 5.4em; height: 1.7em;
  margin-left: -2.7em; transform: rotate(-3deg);
  background: rgba(238, 226, 190, 0.62); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}
.polaroid:nth-child(3n).taped::before { transform: rotate(4deg); }
body.stories-picking .table-bar { display: none; }

/* Tiles with a known shape: the grid row span fixes the height, the picture just fills it. */
.tile.has-ratio img, .tile.has-ratio video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
