/* ============================================================
   THE PHOTO LAB
   ============================================================ */

/* ---------- the 4 photo slots ---------- */
.lab-slots {
  max-width: 640px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 3vw, 22px);
}
.lab-slot {
  position: relative; aspect-ratio: 3 / 4;
  background: #fff; border: 0; padding: 7px 7px 22px;
  box-shadow: 0 10px 22px rgba(74, 47, 39, .16);
  transform: rotate(var(--r));
  transition: transform .25s;
}
@media (hover: hover) { .lab-slot:hover { transform: rotate(0) translateY(-4px); } }
.lab-slot:not(.has)::before {
  content: ''; position: absolute; inset: 7px 7px 22px;
  border: 2px dashed rgba(74, 47, 39, .28);
  background: repeating-linear-gradient(45deg, var(--peach-3) 0 10px, var(--peach-2) 10px 20px);
}
.lab-slot img { width: 100%; height: 100%; object-fit: cover; display: block; animation: pop .5s; }
.lab-plus {
  position: relative; display: block; margin-top: 18%;
  font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 6vw, 2.4rem); color: var(--red);
}
.lab-slot-label { position: relative; display: block; font-family: var(--hand); font-size: clamp(.95rem, 3.4vw, 1.2rem); color: var(--ink-soft); }
.lab-remove {
  position: absolute; top: -9px; right: -9px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--red); color: #fff; font-size: 1rem; line-height: 26px; text-align: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, .2);
}
.lab-note { margin-top: 1.4rem; }

/* ---------- tabs ---------- */
.lab-tabs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem;
  margin: 1.2rem auto 1.6rem;
  opacity: .45; transition: opacity .4s;
}
.lab-ready .lab-tabs { opacity: 1; }
.lab-tab {
  border: 2px solid var(--ink); background: transparent; border-radius: 999px;
  padding: .55rem 1.1rem; min-height: 44px; font-family: var(--display); font-weight: 600; font-size: .95rem;
  transition: background .2s, color .2s, transform .2s;
}
@media (hover: hover) { .lab-tab:not(:disabled):hover { transform: translateY(-2px); } }
.lab-tab.active { background: var(--ink); color: var(--cream); }
.lab-tab:disabled { cursor: not-allowed; }

.lab-panel { animation: pop .45s ease-out; }
.lab-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .8rem; margin-top: 1.4rem; }

/* ---------- 1. magazine cover ---------- */
.cover-stage { display: flex; justify-content: center; perspective: 900px; }
.cover-stage img {
  width: min(420px, 100%); aspect-ratio: 1080 / 1350; object-fit: cover;
  background: #2b211d;
  box-shadow: 0 24px 50px rgba(40, 20, 5, .35), 0 2px 0 rgba(255, 255, 255, .4) inset;
  opacity: 0; transform: rotateY(-25deg) rotateX(6deg) scale(.9);
  transition: opacity .6s, transform 1.1s cubic-bezier(.2, .9, .3, 1.2);
}
.cover-stage img.printed { opacity: 1; transform: rotate(-1.5deg); }

/* ---------- 2. photobooth ---------- */
.booth {
  width: min(320px, 86vw); margin: 0 auto;
  background: linear-gradient(#d6455a, #b8323f); border-radius: 18px 18px 8px 8px;
  padding: 16px 18px 0; box-shadow: 0 18px 40px rgba(60, 10, 20, .35);
  position: relative;
}
.booth-sign {
  text-align: center; color: #fff4d6;
  font-family: var(--serif); font-weight: 700; font-size: 1.6rem; letter-spacing: .12em;
  text-shadow: 0 0 10px rgba(255, 220, 150, .8);
}
.booth-sign span { display: block; font-size: .8rem; letter-spacing: .5em; margin-top: -4px; }
.booth-screen {
  position: relative; margin: 12px auto 0; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
  background: radial-gradient(#3a3340, #16121a); border: 6px solid #2b1f22;
  display: grid; place-items: center;
}
.booth-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; filter: sepia(.25) contrast(1.05); }
.booth-screen img.show { opacity: 1; }
#boothCount { position: relative; z-index: 1; color: #fff; font-family: var(--display); font-weight: 700; font-size: 2rem; }
#boothCount.tick { animation: tick .65s ease-out; }
@keyframes tick { from { transform: scale(1.8); opacity: 0; } 30% { opacity: 1; } to { transform: scale(1); } }
.booth-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 2; }
.booth-flash.go { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
.booth-slot {
  margin: 14px auto 0; width: 64%; height: 14px; border-radius: 8px 8px 0 0;
  background: #1f1416;
}
/* the strip lives in the normal page flow right under the machine, so the
   buttons below always move down with it and can never be covered */
.booth-out {
  width: calc(min(320px, 86vw) * .56); margin: -2px auto 0;
  height: 0; overflow: hidden;
  transition: height 3s cubic-bezier(.4, 0, .2, 1);
}
.booth-out img {
  width: 100%; display: block;
  transform: translateY(-100%);
  transition: transform 3s cubic-bezier(.4, 0, .2, 1);
}
.booth-out.printing img { transform: none; }
.booth-out.printed { overflow: visible; }
.booth-out.printed img { transform: rotate(2deg); transition: transform .5s; box-shadow: 0 10px 20px rgba(0, 0, 0, .25); }

/* ---------- 3. polaroids ---------- */
.scrapbook {
  position: relative; margin: 0 auto;
  width: min(560px, 100%); height: clamp(460px, 120vw, 560px);
  background-color: #fff8ec;
  background-image: radial-gradient(rgba(180, 150, 120, .35) 1.2px, transparent 1.6px);
  background-size: 22px 22px;
  border-radius: 6px; box-shadow: 0 16px 34px rgba(74, 47, 39, .18);
  overflow: hidden; touch-action: none;
}
.scrapbook::after { content: 'siya at 19 ♡'; position: absolute; right: 14px; bottom: 8px; font-family: var(--hand); font-size: 1.5rem; color: var(--ink-soft); pointer-events: none; }
.polaroid-card {
  position: absolute; left: 0; top: 0;
  background: #fff; padding: 6% 6% 0;
  box-shadow: 0 8px 18px rgba(60, 40, 20, .28);
  cursor: grab; user-select: none; -webkit-user-select: none;
  animation: drop-in .7s cubic-bezier(.3, 1.4, .5, 1) both;
}
.polaroid-card.lifted { cursor: grabbing; box-shadow: 0 18px 30px rgba(60, 40, 20, .35); }
.polaroid-card::before {       /* washi tape */
  content: ''; position: absolute; top: -10px; left: 50%; width: 36%; height: 22px; margin-left: -18%;
  background: var(--tape, rgba(255, 170, 195, .75)); transform: rotate(-7deg);
}
@keyframes drop-in { from { opacity: 0; margin-top: -60px; } to { opacity: 1; margin-top: 0; } }
.pol-photo { aspect-ratio: 1; overflow: hidden; background: #1c1a1d; }
.pol-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none;
  filter: grayscale(1) brightness(1.9) contrast(.35) blur(3px) sepia(0) saturate(1); opacity: .25;
  transition: filter 7s ease-out, opacity 4s ease-out;
}
.developed .pol-photo img { filter: grayscale(0) brightness(1) contrast(1.03) blur(0) sepia(.12) saturate(1.05); opacity: 1; }
.pol-cap { margin: 0; padding: .45em .2em .6em; text-align: center; font-family: var(--hand); font-weight: 700; font-size: clamp(1rem, 4vw, 1.3rem); line-height: 1.1; color: #3a2a22; }

@media (max-width: 480px) {
  .lab-tab { font-size: .85rem; padding: .5rem .85rem; }
}

/* ---------- add photos: gallery or camera ---------- */
.lab-add { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 1.6rem; }

.cam {
  position: fixed; inset: 0; z-index: 170;
  background: rgba(20, 16, 31, .88);
  display: grid; place-items: center; padding: 16px;
}
.cam-card {
  position: relative; width: min(440px, 100%);
  background: #fff; padding: 12px 12px 18px; border-radius: 14px; text-align: center;
}
.cam-view { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 8px; background: #111; }
.cam-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-view.mirror video { transform: scaleX(-1); }
.cam-count {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-family: var(--display); font-weight: 700; font-size: 5rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .5); pointer-events: none;
}
.cam-count.tick { animation: tick .8s ease-out; }
.cam-hint { margin: .6rem 0 0; }
.cam .lab-actions { margin-top: .6rem; }
.cam .close {
  position: absolute; right: -10px; top: -10px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: var(--red); color: #fff; font-size: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}

/* little thumbnails of the shots taken so far */
.cam-shots { display: flex; justify-content: center; gap: 8px; margin-top: .5rem; min-height: 46px; }
.cam-shot {
  width: 36px; height: 46px; border-radius: 4px;
  border: 2px dashed rgba(74, 47, 39, .3); background: center/cover no-repeat;
}
.cam-shot.taken { border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .25); animation: pop .4s; }

/* ---------- "send this to you" ---------- */
.btn-send {
  background: linear-gradient(135deg, #ff7aa8, #e9467c); color: #fff;
  box-shadow: 0 6px 0 #c33462, 0 12px 24px rgba(233, 70, 124, .3);
}
.send-status {
  width: 100%; text-align: center; margin: .2rem 0 0;
  font-family: var(--hand); font-size: 1.2rem; color: var(--teal); min-height: 1.4em;
}

/* ============================================================
   Photo Lab additions — every preview is sized to fit one phone screen
   ============================================================ */
#lab { --ph: min(58vh, 480px); }          /* the tallest any preview may be */

/* ---------- cover: smaller, and "✥ Move photo" ---------- */
.cover-frame { position: relative; width: min(330px, 84vw, calc(var(--ph) * .8)); }
.cover-live { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-1.5deg); pointer-events: none; }
.cover-frame.moving { touch-action: none; cursor: grab; }
.cover-frame.moving::after { content: ''; position: absolute; inset: -6px; border: 2px dashed var(--teal); border-radius: 6px; pointer-events: none; transform: rotate(-1.5deg); }
.move-hint { text-align: center; margin: .9rem auto 0; max-width: 300px; font-size: .78rem; line-height: 1.4; color: var(--teal); }
#coverMove[aria-pressed="true"] { opacity: 1; color: var(--teal); }

/* ---------- segmented controls (photobooth options + poster types) ---------- */
.seg {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  background: rgba(74, 47, 39, .08); border-radius: 999px;
}
.seg button {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 0; background: transparent; color: var(--ink-soft); border-radius: 999px;
  padding: .38rem .85rem; font-family: var(--display); font-weight: 600; font-size: .8rem; letter-spacing: .02em;
  transition: background .2s, color .2s, box-shadow .2s;
}
@media (hover: hover) { .seg button:hover { color: var(--ink); } }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(74, 47, 39, .16); }
.seg-wrap { flex-wrap: wrap; justify-content: center; border-radius: 18px; }

/* ---------- photobooth options: a small card under the printed strip ---------- */
.booth-opts {
  width: min(320px, 100%); margin: 1.4rem auto 0; padding: .75rem .9rem;
  display: grid; gap: .55rem;
  background: rgba(255, 255, 255, .7); border-radius: 18px;
  box-shadow: 0 8px 22px rgba(74, 47, 39, .1);
  transition: opacity .2s;
}
.booth-opts.busy { opacity: .6; pointer-events: none; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.opt-label { font-family: var(--display); font-weight: 600; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.ico-strip, .ico-grid { display: inline-block; width: 10px; height: 14px; border: 2px solid currentColor; border-radius: 2px; opacity: .8; }
.ico-strip { background: linear-gradient(currentColor 0 0) 0 50% / 100% 2px no-repeat; }
.ico-grid { width: 13px; height: 13px; background: linear-gradient(currentColor 0 0) 50% 0 / 2px 100% no-repeat, linear-gradient(currentColor 0 0) 0 50% / 100% 2px no-repeat; }
.swatches { display: flex; gap: .55rem; padding: 2px; }
.swatches button {
  width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: var(--sw);
  box-shadow: 0 0 0 1px rgba(74, 47, 39, .25), 0 2px 5px rgba(74, 47, 39, .15);
  transition: transform .15s, box-shadow .15s;
}
@media (hover: hover) { .swatches button:hover { transform: scale(1.1); } }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink), 0 2px 5px rgba(74, 47, 39, .2); }
.booth-out.grid { width: min(240px, 64vw); }

/* ---------- posters ---------- */
.poster-kinds { display: flex; width: fit-content; max-width: 100%; margin: 0 auto 1.2rem; }
.poster-stage { display: flex; justify-content: center; perspective: 900px; }
.poster-stage img {
  display: block; width: auto; height: auto; max-width: min(320px, 84vw); max-height: var(--ph); min-height: 160px;
  background: #2b211d; border-radius: 4px;
  box-shadow: 0 20px 44px rgba(40, 20, 5, .3);
  opacity: 0; transform: rotateY(-20deg) scale(.92); transition: opacity .6s, transform 1s cubic-bezier(.2, .9, .3, 1.2);
}
.poster-stage img.printed { opacity: 1; transform: rotate(1deg); }
.poster-stage.plain img.printed { transform: none; }

/* ---------- polaroid story video ---------- */
.pol-video {
  display: block; width: auto; max-width: min(200px, 52vw); max-height: min(50vh, 360px);
  margin: 1.2rem auto 0; border-radius: 10px; background: #fff8ec;
  box-shadow: 0 14px 30px rgba(74, 47, 39, .22);
}

/* ---------- my creations: one small collapsible row ---------- */
.shelf { max-width: 560px; margin: 2.2rem auto 0; }
.shelf-title {
  display: flex; align-items: center; justify-content: center; gap: .4rem; width: fit-content; margin: 0 auto;
  padding: .45rem 1rem; border-radius: 999px; background: rgba(255, 255, 255, .7);
  box-shadow: 0 4px 12px rgba(74, 47, 39, .1); cursor: pointer; list-style: none;
  font-family: var(--display); font-weight: 600; font-size: .85rem; color: var(--ink);
}
.shelf-title::-webkit-details-marker { display: none; }
.shelf-title::after { content: '▾'; font-size: .7rem; opacity: .6; transition: transform .2s; }
.shelf[open] .shelf-title::after { transform: rotate(180deg); }
.shelf-title span { font-family: var(--body); font-weight: 400; color: var(--ink-soft); }
.shelf-grid {
  display: flex; gap: 8px; overflow-x: auto; padding: .8rem 4px 6px; margin-top: .4rem;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.shelf-item {
  flex: none; position: relative; width: 58px; aspect-ratio: 3 / 4; border: 0; padding: 3px; background: #fff;
  border-radius: 6px; box-shadow: 0 4px 10px rgba(74, 47, 39, .14); overflow: hidden; scroll-snap-align: start;
}
.shelf-item img, .shelf-item video { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 3px; pointer-events: none; }
.shelf-badge { position: absolute; right: 5px; bottom: 5px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: .55rem; display: grid; place-items: center; }
.shelf-view { position: fixed; inset: 0; z-index: 172; display: grid; place-items: center; padding: 16px; background: rgba(20, 16, 31, .86); }
.sv-card { width: min(380px, 100%); max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; align-items: center; }
.sv-media { width: 100%; display: flex; justify-content: center; }
.sv-media img, .sv-media video { max-width: 100%; max-height: 66vh; max-height: 66dvh; width: auto; height: auto; border-radius: 8px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); background: #fff; }
.shelf-view .link-btn { color: #fff; }

/* tighter action rows on phones */
@media (max-width: 480px) {
  .lab-actions { gap: .5rem .6rem; }
  .lab-actions .btn { padding: .7rem 1.2rem; font-size: .92rem; }
  .seg button { padding: .34rem .7rem; font-size: .76rem; }
}

/* ============================================================
   Photo Lab: look, surprise, framing, reorder, live booth, papers, poster text
   ============================================================ */
/* tools row above the tabs */
.lab-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; margin: 1.4rem auto 0; opacity: .45; transition: opacity .4s; }
.lab-ready .lab-tools { opacity: 1; }
.surprise-btn {
  border: 0; border-radius: 999px; padding: .5rem 1rem; min-height: 44px;
  background: linear-gradient(135deg, #ffb3c7, #c8b8ff); color: #3a2350;
  font-family: var(--display); font-weight: 700; font-size: .82rem; letter-spacing: .02em;
  box-shadow: 0 6px 16px rgba(131, 119, 228, .25); transition: transform .15s;
}
@media (hover: hover) { .surprise-btn:hover { transform: translateY(-2px) rotate(-1deg); } }
.lab-tab.spin { background: #ffe9a8; border-color: #f2b300; transform: scale(1.06); }

/* the photo slots: ✥ frame button, dragging */
.lab-frame {
  position: absolute; left: -9px; top: -9px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--teal); color: #fff; font-size: .8rem; line-height: 26px; text-align: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, .2);
}
.lab-slot.dragging { z-index: 20; scale: 1.08; box-shadow: 0 18px 34px rgba(74, 47, 39, .3); transition: none; cursor: grabbing; }
.lab-slot.drop { outline: 3px dashed var(--teal); outline-offset: 4px; }
.lab-slot.has { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* framing pop-up */
.framer { position: fixed; inset: 0; z-index: 174; display: grid; place-items: center; padding: 16px; background: rgba(20, 16, 31, .86); }
.framer-card { width: min(340px, 100%); background: var(--paper); border-radius: 18px; padding: 1rem 1rem .6rem; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.framer-title { margin: 0 0 .7rem; font-family: var(--serif); font-weight: 600; font-size: 1.2rem; }
.framer-view { position: relative; width: min(260px, 70vw, calc(52vh * .8)); margin: 0 auto; aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; touch-action: none; cursor: grab; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6), 0 10px 24px rgba(74, 47, 39, .2); }
.framer-view canvas { width: 100%; height: 100%; display: block; }
.framer-view::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(transparent 33.2%, rgba(255, 255, 255, .45) 33.3% 33.6%, transparent 33.7% 66.4%, rgba(255, 255, 255, .45) 66.5% 66.8%, transparent 66.9%), linear-gradient(90deg, transparent 33.2%, rgba(255, 255, 255, .45) 33.3% 33.6%, transparent 33.7% 66.4%, rgba(255, 255, 255, .45) 66.5% 66.8%, transparent 66.9%); }

/* the white front flash */
.front-flash { position: fixed; inset: 0; z-index: 400; background: #fff; opacity: 0; pointer-events: none; transition: opacity .12s ease-out; }
.front-flash.on { opacity: 1; transition-duration: .04s; }

/* live photobooth: the camera inside the booth screen */
.booth-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); opacity: 0; transition: opacity .3s; }
.booth-screen.live video { opacity: 1; }
.booth-screen.live #boothCount { text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }

/* "printing…" shimmer while a cover or poster is being made */
.cover-frame.rendering::before, .poster-stage.rendering::before {
  content: ''; position: absolute; z-index: 1; border-radius: 4px; pointer-events: none;
  background: linear-gradient(100deg, #efe2d2 20%, #fff7ee 40%, #efe2d2 60%) 0 0 / 300% 100%;
  animation: shimmer 1.1s linear infinite;
}
.cover-frame.rendering::before { inset: 0; transform: rotate(-1.5deg); }
.poster-stage { position: relative; min-height: 160px; }
.poster-stage.rendering::before { left: 50%; top: 0; width: min(280px, 76vw); height: min(var(--ph), 420px); margin-left: calc(min(280px, 76vw) / -2); }
@keyframes shimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .cover-frame.rendering::before, .poster-stage.rendering::before { animation: none; } }

/* scrapbook papers */
.paper-pick { display: flex; align-items: center; justify-content: center; gap: .7rem; margin: 1rem auto 0; }
.pp-dots { background: #fff8ec radial-gradient(rgba(180, 150, 120, .55) 1.5px, transparent 2px) 0 0 / 7px 7px !important; }
.pp-gingham { background: #fff6f8 linear-gradient(90deg, rgba(255, 143, 177, .45) 50%, transparent 50%) 0 0 / 8px 8px, linear-gradient(rgba(255, 143, 177, .45) 50%, transparent 50%) 0 0 / 8px 8px !important; }
.pp-kraft { background: #d6b88c !important; }
.pp-night { background: radial-gradient(1px 1px at 30% 35%, #fff, transparent), radial-gradient(1px 1px at 70% 60%, #fff, transparent), linear-gradient(#1b1529, #2d2145) !important; }
.scrapbook.paper-gingham { background-color: #fff6f8; background-image: linear-gradient(90deg, rgba(255, 143, 177, .28) 50%, transparent 50%), linear-gradient(rgba(255, 143, 177, .28) 50%, transparent 50%); background-size: 28px 28px; }
.scrapbook.paper-kraft { background-color: #d6b88c; background-image: radial-gradient(rgba(90, 55, 20, .16) 1px, transparent 1.4px); background-size: 9px 9px; }
.scrapbook.paper-night {
  background-color: #1b1529;
  background-image: radial-gradient(1.4px 1.4px at 12% 18%, #fff, transparent), radial-gradient(1.2px 1.2px at 64% 9%, #fff, transparent), radial-gradient(1.4px 1.4px at 86% 44%, #ffe2b8, transparent), radial-gradient(1px 1px at 30% 70%, #fff, transparent), radial-gradient(1.3px 1.3px at 78% 88%, #fff, transparent), linear-gradient(#1b1529, #2d2145);
  background-size: auto;
}
.scrapbook.paper-night::after { color: #ffe2b8; }

/* disposable look on the polaroid cards (same filter list as "developed", so the develop animation still works) */
.scrapbook.disposable .developed .pol-photo img { filter: grayscale(0) brightness(1.03) contrast(1.08) blur(0) sepia(.32) saturate(1.3); }
.pol-photo { position: relative; }
.pol-stamp { position: absolute; right: 7%; bottom: 6%; font: 700 clamp(.6rem, 2.6vw, .8rem) "Courier New", monospace; color: #ff8a2a; text-shadow: 0 0 6px rgba(255, 110, 20, .9); opacity: 0; transition: opacity 2s 2s; pointer-events: none; }
.scrapbook.disposable .developed .pol-stamp { opacity: 1; }

/* ✎ edit poster text */
.poster-edit { width: min(340px, 100%); margin: 1rem auto 0; padding: .8rem .9rem .3rem; background: rgba(255, 255, 255, .75); border-radius: 16px; box-shadow: 0 8px 22px rgba(74, 47, 39, .1); text-align: center; }
.pe-fields { display: grid; gap: .5rem; text-align: left; }
.pe-field { display: grid; gap: .2rem; }
.pe-field span { font-family: var(--display); font-weight: 600; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.pe-field input { width: 100%; border: 1.5px solid #e6d6c4; border-radius: 10px; padding: .5rem .7rem; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; }   /* 16px: smaller makes iOS zoom in on focus */
.pe-field input:focus { outline: none; border-color: var(--teal); }
.poster-edit .link-btn { font-size: .78rem; }
#posterEditBtn[aria-expanded="true"] { opacity: 1; color: var(--teal); }
.lab-slot.has img { -webkit-touch-callout: none; pointer-events: none; -webkit-user-drag: none; }

/* ---------- fallback when the share menu won't open ---------- */
.share-sheet { position: fixed; inset: 0; z-index: 178; display: grid; place-items: end center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: rgba(20, 16, 31, .6); }
.ss-card { width: min(380px, 100%); background: var(--paper); border-radius: 22px; padding: 1.2rem 1.1rem .8rem; text-align: center; box-shadow: 0 -10px 40px rgba(0, 0, 0, .3); animation: star-wish-in .35s ease both; }
.ss-title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.25rem; }
.ss-sub { margin: .3rem 0 1rem; font-size: .88rem; color: var(--ink-soft); }
.ss-btns { display: grid; gap: .6rem; }
.ss-btns .btn { width: 100%; }
.ss-status { min-height: 1.3em; margin: .7rem 0 0; font-family: var(--hand); font-size: 1.2rem; color: var(--teal); }
.ss-close { font-size: .8rem; }
