/* Station overlays use violet trim and pale writing surfaces. */
:root {
  --choco: #422951;
  --choco2: #654974;
  --cream: #f5eef8;
  --cream2: #eadcf2;
  --mint: #b48dd2;
  --mint2: #a678cb;
  --mintd: #824eab;
  --inkc: #35233d;
}

.ov {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
}
.ov.open {
  display: flex;
}
.ov-bg {
  position: absolute;
  inset: 0;
  background: rgba(12, 8, 17, 0.64);
  -webkit-backdrop-filter: blur(8px) saturate(0.95);
  backdrop-filter: blur(8px) saturate(0.95);
  opacity: 0;
  transition: opacity 0.5s;
}
.ov.open .ov-bg {
  opacity: 1;
}
.ov-panel {
  position: relative;
  width: min(640px, 94vw);
  max-height: 94vh;
  overflow: hidden auto;
  padding: 26px 24px 22px;
  border-radius: 24px;
  text-align: center;
  color: var(--inkc);
  background: var(--cream);
  border: 6px solid var(--mint);
  box-shadow:
    0 0 0 2px var(--choco) inset,
    0 24px 60px rgba(60, 40, 30, 0.25);
  transform: translateY(18px) scale(0.97);
  opacity: 0;
  transition:
    transform 0.55s cubic-bezier(0.2, 0.9, 0.2, 1),
    opacity 0.4s;
}
.ov.open .ov-panel {
  transform: none;
  opacity: 1;
}
.ov-panel::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 14px;
  pointer-events: none;
  background:
    radial-gradient(circle at 7px 7px, var(--choco) 2.4px, transparent 3px) 0 0 / 18px 14px,
    var(--mint);
  opacity: 0.9;
}
.ov-close {
  position: absolute;
  top: 18px;
  left: 14px;
  border: 0;
  background: none;
  font: 500 13px/1.45 var(--cn);
  letter-spacing: 0.02em;
  color: var(--choco2);
  cursor: pointer;
  padding: 6px;
  z-index: 5;
}
.ov-close:hover {
  color: var(--choco);
}
.ov-kicker {
  font:
    italic 500 15px 'Cormorant',
    var(--cn);
  letter-spacing: 0.09em;
  color: #583d6e;
  margin: 8px 0 2px;
}
.st-line {
  font: 400 23px/1.4 var(--writing);
  letter-spacing: 0.035em;
  margin: 2px 0 6px;
  color: var(--choco);
}
.st-sub {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.025em;
  color: var(--choco2);
  min-height: 1.4em;
  margin-top: 8px;
}
.st-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  font: 500 15px/1.5 var(--cn);
  letter-spacing: 0.035em;
  color: var(--cream);
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  border: 0;
  background: linear-gradient(180deg, var(--choco2), var(--choco));
  box-shadow: 0 6px 16px rgba(91, 58, 41, 0.28);
  transition: transform 0.15s;
}
.btn:active {
  transform: scale(0.96);
}
.btn.ghost {
  background: var(--cream);
  color: var(--choco);
  box-shadow: inset 0 0 0 2px var(--mint2);
}
.btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
}
.script {
  font-family: 'Princess Sofia', cursive;
}
.big-script {
  font:
    46px 'Princess Sofia',
    cursive;
  color: var(--choco);
  line-height: 1.1;
}
.ph {
  background-size: cover;
  background-position: center;
}

/* ---------- angel: polaroid booth ---------- */
.booth {
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: start;
  margin-top: 8px;
  text-align: left;
}
.cam {
  position: relative;
  width: 200px;
  height: 160px;
  cursor: pointer;
}
.cam svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.flash {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 60;
}
.flash.go {
  animation: flash 0.6s ease-out;
}
@keyframes flash {
  0% {
    opacity: 0;
  }
  8% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
  }
}
.pola-wrap {
  position: relative;
  min-height: 350px;
  display: flex;
  justify-content: center;
}
.pola {
  position: relative;
  width: 260px;
  padding: 14px 14px 52px;
  background: #fffdf9;
  box-shadow: 0 12px 28px rgba(60, 40, 30, 0.22);
  border-radius: 3px;
  transform: translateY(-40px) rotate(-2deg);
  opacity: 0;
  transition:
    transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.3s;
}
.pola.out {
  transform: translateY(0) rotate(-2deg);
  opacity: 1;
}
.pola .shot {
  position: relative;
  width: 232px;
  height: 260px;
  overflow: hidden;
  background: #2b2420;
  touch-action: none;
}
.pola .shot .img {
  position: absolute;
  inset: 0;
  filter: brightness(0.05) sepia(1) contrast(0.6);
  opacity: 0.3;
  transition:
    filter 3.2s ease-out,
    opacity 2.4s ease-out;
}
.pola.dev .shot .img {
  filter: none;
  opacity: 1;
}
.pola .cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  text-align: center;
  font:
    26px 'Princess Sofia',
    cursive;
  color: var(--choco);
}
.stk {
  position: absolute;
  left: 0;
  top: 0;
  width: 70px;
  height: 70px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.stk svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.tray {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.4s;
}
.tray.on {
  opacity: 1;
  pointer-events: auto;
}
.tray button {
  border: 0;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  aspect-ratio: 1;
  cursor: grab;
  box-shadow: inset 0 0 0 2px var(--mint);
  touch-action: none;
}
.tray button svg {
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.booth-tip {
  font-size: 12px;
  color: var(--choco2);
  margin-top: 8px;
  line-height: 1.6;
}
@media (max-width: 600px) {
  .booth {
    grid-template-columns: 1fr;
  }
  .cam {
    margin: 0 auto;
    width: 170px;
    height: 136px;
  }
  .tray {
    grid-template-columns: repeat(8, 1fr);
  }
}

/* ---------- card: benefit photocards ---------- */
.pc-zone {
  position: relative;
  height: 360px;
  margin-top: 4px;
  perspective: 900px;
}
.sleeve {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 210px;
  height: 296px;
  transform: translateX(-50%);
  border-radius: 12px;
  cursor: pointer;
  z-index: 3;
  background:
    radial-gradient(circle at 10px 10px, rgba(91, 58, 41, 0.85) 3px, transparent 3.6px) 0 0 / 22px 22px,
    var(--mint);
  box-shadow:
    0 10px 24px rgba(60, 40, 30, 0.2),
    inset 0 0 0 5px rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    transform 0.6s cubic-bezier(0.6, -0.2, 0.4, 1.4),
    opacity 0.5s;
}
.sleeve .lbl {
  background: var(--cream);
  padding: 12px 18px 10px;
  border-radius: 10px;
  box-shadow: 0 0 0 2px var(--choco);
}
.sleeve .lbl .big-script {
  font-size: 38px;
}
.sleeve .lbl p {
  margin: 2px 0 0;
  font:
    italic 500 12px 'Cormorant',
    serif;
  letter-spacing: 0.2em;
  color: var(--choco2);
}
.sleeve .tear {
  position: absolute;
  top: 30px;
  left: 10px;
  right: 10px;
  border-top: 2px dashed var(--choco);
}
.sleeve .tear::after {
  content: '✂ 撕开';
  position: absolute;
  right: 0;
  top: -20px;
  font: 500 12px/1.4 var(--cn);
  letter-spacing: 0.04em;
  color: var(--choco);
  background: var(--mint);
  padding: 0 4px;
}
.sleeve.opened {
  transform: translate(-50%, 190px) rotate(5deg);
  opacity: 0;
  pointer-events: none;
}
.pc {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 200px;
  height: 292px;
  margin-left: -100px;
  transform-style: preserve-3d;
  cursor: pointer;
  z-index: 2;
  transition:
    transform 0.9s cubic-bezier(0.2, 0.9, 0.2, 1),
    opacity 0.4s;
  transform: translateY(60px) scale(0.9);
  opacity: 0;
}
.pc.out {
  transform: translateY(-12px);
  opacity: 1;
}
.pc-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.3, 0.9, 0.3, 1);
}
.pc-face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 6px solid #fffdf9;
  box-shadow: 0 12px 30px rgba(60, 40, 30, 0.25);
}
.pc-front .ph {
  position: absolute;
  inset: 0;
}
.pc-front .nm {
  position: absolute;
  left: 10px;
  bottom: 6px;
  font:
    32px 'Princess Sofia',
    cursive;
  color: #fff;
  text-shadow: 0 1px 6px rgba(60, 40, 30, 0.6);
}
.pc-front .no {
  position: absolute;
  right: 10px;
  top: 8px;
  font:
    italic 600 12px 'Cormorant',
    serif;
  color: #fff;
  letter-spacing: 0.15em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.pc-front .holo {
  position: absolute;
  inset: 0;
  mix-blend-mode: color-dodge;
  opacity: 0.5;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(194, 143, 235, 0.8) 36%,
    rgba(255, 214, 170, 0.7) 46%,
    rgba(200, 180, 255, 0.7) 56%,
    transparent 72%
  );
  background-size: 260% 260%;
  background-position: var(--hx, 50%) var(--hy, 50%);
}
.pc-back,
.wall {
  background:
    radial-gradient(circle at 8px 8px, rgba(180, 141, 210, 0.7) 2.5px, transparent 3px) 0 0 / 18px 18px,
    var(--cream);
}
.pc-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 14px;
}
.pc-back .script {
  font-size: 26px;
  color: var(--choco);
  margin-bottom: 10px;
}
.pc-back p {
  white-space: pre-line;
  margin: 0;
  font: 400 17px/1.65 var(--writing);
  white-space: pre-line;
  text-wrap: balance;
  color: var(--inkc);
  background: #fffdf9;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 0 0 1.5px var(--mint2);
}
.pc-back time {
  margin-top: 10px;
  font:
    italic 600 13px 'Cormorant',
    serif;
  letter-spacing: 0.2em;
  color: var(--choco2);
}
.pc-shelf {
  display: flex;
  gap: 8px;
  justify-content: center;
  min-height: 52px;
  margin-top: 4px;
}
.pc-shelf i {
  width: 34px;
  height: 48px;
  border-radius: 4px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px var(--choco);
  animation: drop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.pc-shelf i.empty {
  background: rgba(180, 141, 210, 0.35);
  border: 1.5px dashed var(--mintd);
  box-shadow: none;
  animation: none;
}
@keyframes drop {
  from {
    transform: translateY(-40px) scale(1.4);
    opacity: 0;
  }
}

/* ---------- dream: gacha + coupon ---------- */
.gacha-stage {
  position: relative;
  height: 390px;
}
.gacha {
  position: absolute;
  left: 50%;
  top: 0;
  width: 240px;
  margin-left: -120px;
  transition:
    opacity 0.4s,
    transform 0.4s;
}
.gacha.dim {
  opacity: 0.25;
  transform: scale(0.92);
}
.gacha svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.gacha .knob {
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: 50% 50%;
  transition: transform 1.1s cubic-bezier(0.3, 0.1, 0.2, 1);
}
.gacha.shake .dome-caps {
  animation: jig 0.12s linear 8;
  transform-box: fill-box;
  transform-origin: 50% 80%;
}
@keyframes jig {
  50% {
    transform: translate(2px, -2px) rotate(2deg);
  }
}
.capsule {
  position: absolute;
  left: 50%;
  top: 292px;
  width: 64px;
  height: 64px;
  margin-left: -32px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-60px) scale(0.6);
  transition:
    transform 0.7s cubic-bezier(0.3, 1.5, 0.5, 1),
    opacity 0.2s;
  z-index: 3;
}
.capsule.drop {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.capsule .top,
.capsule .bot {
  position: absolute;
  left: 0;
  width: 64px;
  height: 32px;
  transition:
    transform 0.7s cubic-bezier(0.3, 1.4, 0.4, 1),
    opacity 0.5s;
}
.capsule .top {
  top: 0;
  border-radius: 32px 32px 0 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.55), transparent 40%), var(--choco);
}
.capsule .bot {
  top: 32px;
  border-radius: 0 0 32px 32px;
  background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.6), transparent 40%), rgba(226, 205, 243, 0.95);
  box-shadow: inset 0 0 0 2px rgba(91, 58, 41, 0.2);
}
.capsule.open .top {
  transform: translate(-46px, -60px) rotate(-60deg);
  opacity: 0;
}
.capsule.open .bot {
  transform: translate(46px, 40px) rotate(40deg);
  opacity: 0;
}
.capsule::after {
  content: '点开';
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  font-size: 11px;
  color: var(--choco2);
  letter-spacing: 0.2em;
}
.capsule.open::after {
  content: none;
}
.coupon {
  position: absolute;
  left: 50%;
  top: 110px;
  width: min(420px, 82vw);
  transform: translate(-50%, 30px) scale(0.6);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.7s cubic-bezier(0.2, 1.3, 0.4, 1),
    opacity 0.3s;
  z-index: 4;
  background: var(--cream);
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow:
    0 0 0 3px var(--choco),
    0 14px 30px rgba(60, 40, 30, 0.25);
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 12px;
  align-items: center;
  text-align: left;
}
.coupon.show {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.coupon::before,
.coupon::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--cream2);
  box-shadow: inset 0 0 0 3px var(--choco);
}
.coupon::before {
  left: -10px;
}
.coupon::after {
  right: -10px;
}
.coupon .k {
  font:
    italic 600 12px 'Cormorant',
    serif;
  letter-spacing: 0.2em;
  color: var(--mintd);
}
.coupon .t {
  font:
    34px 'Princess Sofia',
    cursive;
  color: var(--choco);
  line-height: 1.15;
}
.coupon .n {
  font-size: 12px;
  line-height: 1.5;
  color: var(--choco2);
  margin-top: 4px;
}
.coupon .scr {
  position: relative;
  height: 92px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--mint2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.coupon .scr b {
  font: 400 19px/1.3 var(--writing);
  color: var(--choco);
}
.coupon .scr span {
  font-size: 13px;
  color: var(--choco2);
  line-height: 1.4;
  padding: 0 6px;
}
.coupon .scr em {
  font-style: normal;
  font-size: 22px;
}
.coupon .scr canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  transition: opacity 0.5s;
}
.wallet {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 6px;
  min-height: 36px;
  flex-wrap: wrap;
}
.wallet i {
  font-style: normal;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--mint);
  color: var(--choco);
  box-shadow: 0 0 0 2px var(--choco);
  animation: drop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.wallet i.empty {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--mint2);
  color: transparent;
  animation: none;
  width: 64px;
}

/* ---------- film: pull the roll ---------- */
.film-stage {
  position: relative;
  height: 250px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(180deg, #f6efe4, #efe3d3);
  box-shadow: inset 0 0 0 2px var(--cream2);
}
.canister {
  position: absolute;
  left: 8px;
  top: 48px;
  width: 92px;
  height: 150px;
  z-index: 3;
  pointer-events: none;
}
.canister svg {
  width: 100%;
  height: 100%;
}
.strip-win {
  position: absolute;
  left: 92px;
  right: 0;
  top: 58px;
  height: 132px;
  overflow: hidden;
}
.strip {
  position: absolute;
  top: 0;
  height: 132px;
  display: flex;
  flex-direction: row-reverse;
  background: #2a2422;
  touch-action: none;
  cursor: grab;
}
.strip::before,
.strip::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  background: radial-gradient(circle, #f3ece2 2.2px, transparent 2.8px) 0 0 / 14px 12px;
}
.strip::before {
  top: 2px;
}
.strip::after {
  bottom: 2px;
}
.strip .fr {
  width: 150px;
  height: 104px;
  margin: 14px 8px;
  flex: none;
  border-radius: 3px;
  background-color: #444;
  position: relative;
}
.strip .fr.empty {
  background: #3a3330;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d9cfc3;
  font-size: 12px;
  padding: 10px;
  line-height: 1.5;
  text-align: center;
}
.strip .leader {
  width: 70px;
  flex: none;
  clip-path: polygon(0 0, 100% 30%, 100% 70%, 0 100%);
  background: #2a2422;
}
.pull-hint {
  position: absolute;
  right: 14px;
  top: 16px;
  font-size: 12px;
  color: var(--choco2);
  letter-spacing: 0.15em;
  animation: nudge 1.4s ease-in-out infinite;
}
@keyframes nudge {
  50% {
    transform: translateX(8px);
  }
}
.film-cap {
  min-height: 66px;
  margin-top: 12px;
}
.film-cap time {
  display: block;
  font:
    italic 600 13px 'Cormorant',
    serif;
  letter-spacing: 0.2em;
  color: var(--mintd);
}
.film-cap p {
  margin: 2px 0 0;
  font-size: 15px;
  color: var(--inkc);
  line-height: 1.6;
}
.film-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 4px;
}
.film-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cream2);
  box-shadow: inset 0 0 0 1px var(--choco2);
}
.film-dots i.on {
  background: var(--choco);
}

/* ---------- echo: guest wall ---------- */
.ov[data-station='echo'] .fx {
  display: none;
}
.wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 12px;
  margin-top: 8px;
  padding: 14px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px var(--mint2);
}
.note {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  padding: 10px 14px 12px;
  border: 1px solid #e6d4bf;
  border-radius: 4px;
  background: #fffdf8;
  color: var(--inkc);
  text-align: left;
  cursor: pointer;
  box-shadow: 1px 3px 7px rgba(60, 40, 30, 0.15);
}
.note::before {
  content: '';
  position: absolute;
  right: 12px;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b78d74, var(--choco) 75%);
  box-shadow: 0 1px 2px #5b3a2940;
}
.note:nth-child(even)::before {
  background: radial-gradient(circle at 35% 30%, #cbaee2, var(--mintd) 75%);
}
.note b,
.note-full .card b {
  font: 400 19px/1.35 var(--writing);
  color: var(--choco);
}
.note b {
  padding-right: 18px;
}
.note span,
.note-full .card p {
  --line: 24px;
  font: 400 16px/var(--line) var(--writing);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 calc(var(--line) - 1px),
    rgba(180, 141, 210, 0.55) calc(var(--line) - 1px) var(--line)
  );
}
.note .mic {
  align-self: flex-end;
  font-style: normal;
  font-size: 14px;
}
.note.read {
  border-color: var(--mintd);
}
@media (hover: hover) {
  .note:hover {
    box-shadow:
      0 0 0 1px var(--mint2),
      1px 4px 9px rgba(60, 40, 30, 0.18);
  }
}
.note:focus-visible {
  outline: 2px solid var(--choco);
  outline-offset: 2px;
}

.note-full {
  width: min(380px, 88vw);
  max-height: 85vh;
  overflow: auto;
  padding: 24px;
  border: 3px solid var(--mint);
  border-radius: 12px;
  background: var(--cream);
  color: var(--inkc);
  text-align: left;
  box-shadow:
    inset 0 0 0 1px var(--choco),
    0 16px 34px rgba(60, 40, 30, 0.22);
}
.note-full::backdrop {
  background: rgba(60, 40, 30, 0.22);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.note-full .card b {
  font-size: 22px;
}
.note-full .card p {
  --line: 32px;
  font-size: 18px;
  margin: 8px 0 18px;
}
.compose {
  display: none;
  gap: 8px;
  margin-top: 12px;
}
.compose.on {
  display: flex;
}
.compose textarea {
  flex: 1;
  min-width: 0;
  min-height: 60px;
  padding: 8px 12px;
  resize: vertical;
  border: 2px solid var(--mint2);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--inkc);
  font: 400 16px/1.5 var(--writing);
}

/* ---------- love: the letter ---------- */
.letter-stage {
  position: relative;
  min-height: 400px;
  margin-top: 6px;
  perspective: 1000px;
}
.envelope {
  position: absolute;
  left: 50%;
  top: 80px;
  width: 300px;
  height: 190px;
  margin-left: -150px;
  transition:
    transform 0.8s,
    opacity 0.6s;
}
.envelope .body {
  position: absolute;
  inset: 0;
  background: #f6eadb;
  border-radius: 6px;
  box-shadow:
    0 14px 30px rgba(60, 40, 30, 0.2),
    inset 0 0 0 2px #e6d4bf;
}
.envelope .body::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(32deg, transparent 49.5%, #e6d4bf 50%, transparent 50.6%),
    linear-gradient(-32deg, transparent 49.5%, #e6d4bf 50%, transparent 50.6%);
}
.envelope .flap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 110px;
  background: #efdfcb;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0;
  transition: transform 0.8s;
  z-index: 3;
}
.envelope.open .flap {
  transform: rotateX(180deg);
  z-index: 0;
}
.envelope .to {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  text-align: center;
  font:
    26px 'Princess Sofia',
    cursive;
  color: var(--choco);
  z-index: 2;
}
.seal {
  position: absolute;
  left: 50%;
  top: 70px;
  width: 56px;
  height: 56px;
  margin-left: -28px;
  z-index: 4;
  cursor: pointer;
  transition:
    transform 0.5s,
    opacity 0.5s;
}
.seal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8a5a44, var(--choco) 60%, #3e271c);
  box-shadow:
    0 3px 6px rgba(0, 0, 0, 0.3),
    inset 0 0 0 5px rgba(255, 255, 255, 0.08);
}
.seal span {
  position: relative;
  display: block;
  text-align: center;
  line-height: 56px;
  font:
    30px 'Princess Sofia',
    cursive;
  color: #e9d3b8;
}
.seal.broken {
  transform: translateY(40px) rotate(30deg) scale(0.6);
  opacity: 0;
}
.envelope.gone {
  transform: translateY(160px) scale(0.9);
  opacity: 0;
  pointer-events: none;
}
.paper {
  position: relative;
  margin: 0 auto;
  width: min(520px, 100%);
  padding: 30px 30px 24px;
  text-align: left;
  transform: translateY(40px) scaleY(0.3);
  opacity: 0;
  transform-origin: 50% 0;
  transition:
    transform 1s cubic-bezier(0.2, 0.9, 0.2, 1),
    opacity 0.5s;
  background: repeating-linear-gradient(180deg, #fffdf8 0 31px, rgba(180, 141, 210, 0.55) 31px 32px), #fffdf8;
  box-shadow: 0 16px 34px rgba(60, 40, 30, 0.18);
  border-radius: 4px;
  display: none;
}
.paper.show {
  transform: none;
  opacity: 1;
}
.paper .to {
  font: 400 22px/32px var(--writing);
  color: var(--choco);
  margin-bottom: 6px;
}
.paper p {
  margin: 0;
  font: 400 18px/32px var(--writing);
  color: var(--inkc);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.9s,
    transform 0.9s;
  text-indent: 2em;
}
.paper p.on {
  opacity: 1;
  transform: none;
}
.paper .sign {
  text-align: right;
  margin-top: 10px;
  font: 400 18px/32px var(--writing);
  color: var(--choco);
  opacity: 0;
  transition: opacity 0.9s;
}
.paper .sign.on {
  opacity: 1;
}
.paper .sign .script {
  font:
    italic 500 20px/1.5 'Cormorant',
    Georgia,
    serif;
  font-variant-numeric: tabular-nums;
}

/* ---------- angel v2: real camera booth ---------- */
.booth3 {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 6px;
  text-align: left;
}
.camera3 {
  position: relative;
  width: 300px;
  padding: 46px 20px 22px;
  border-radius: 28px;
  background: var(--mint);
  box-shadow:
    inset 0 0 0 3px var(--choco),
    0 10px 24px rgba(60, 40, 30, 0.18);
}
.camera3::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 34px;
  border-radius: 28px 28px 0 0;
  background: var(--cream);
  box-shadow: inset 0 0 0 3px var(--choco);
}
.camera3 .brand {
  position: absolute;
  left: 22px;
  top: 2px;
  font:
    26px 'Princess Sofia',
    cursive;
  color: var(--choco);
}
.camera3 .flashwin {
  position: absolute;
  right: 70px;
  top: 9px;
  width: 40px;
  height: 16px;
  border-radius: 4px;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--choco);
}
.camera3 .shutter {
  position: absolute;
  right: 18px;
  top: -12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #c76a5a, #a8423a 60%, #7a2a24);
  box-shadow:
    0 3px 0 #5b3a29,
    inset 0 0 0 3px rgba(255, 255, 255, 0.15);
}
.camera3 .shutter:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #5b3a29;
}
.vf {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 4px;
  overflow: hidden;
  background: #2a2422;
  box-shadow: 0 0 0 6px var(--choco);
}
.vf video {
  opacity: 0;
  pointer-events: none;
}
.vf #live {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.vf video,
.vf canvas.still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vf video.mirror,
.vf canvas.mirror {
  transform: scaleX(-1);
}
.vf .fxl {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.vf .vig {
  background: radial-gradient(ellipse at 50% 50%, transparent 52%, rgba(40, 25, 15, 0.45) 100%);
}
.vf .leak {
  mix-blend-mode: screen;
  opacity: 0.55;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 150, 110, 0.75), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(255, 210, 150, 0.35), transparent 40%);
}
.vf .leak.mint {
  background:
    radial-gradient(circle at 0% 0%, rgba(199, 150, 237, 0.6), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(255, 230, 190, 0.3), transparent 40%);
}
.vf .leak.none {
  opacity: 0;
}
.vf .noise {
  opacity: 0.22;
  mix-blend-mode: overlay;
}
.vf .count {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font:
    700 96px Georgia,
    serif;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.vf .msg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  color: #f3ece2;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}
.lensdot {
  position: absolute;
  left: 20px;
  bottom: 8px;
  font:
    italic 600 11px 'Cormorant',
    serif;
  letter-spacing: 0.2em;
  color: var(--choco);
}
.chips {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.chips button {
  font: 500 13px/1.5 var(--cn);
  padding: 6px 10px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: var(--cream);
  color: var(--choco);
  box-shadow: inset 0 0 0 1.5px var(--mint2);
}
.chips button.on {
  background: var(--choco);
  color: var(--cream);
  box-shadow: none;
}
.booth3 .acts {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.booth3 .acts .btn {
  padding: 9px 16px;
  font-size: 14px;
}
.out3 {
  position: relative;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.out3 .slot {
  width: 270px;
  height: 10px;
  border-radius: 6px;
  background: var(--choco);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}
.out3 .empty-hint {
  margin-top: 40px;
  font-size: 13px;
  color: var(--choco2);
  text-align: center;
  line-height: 1.8;
  opacity: 0.8;
}
.pola3 {
  position: relative;
  width: 250px;
  margin-top: -2px;
  background: #fdfcf8;
  padding: 13px 13px 0;
  box-shadow: 0 12px 26px rgba(60, 40, 30, 0.22);
  transform-origin: 50% 0;
  clip-path: inset(0 0 100% 0);
  transition:
    clip-path 1.6s cubic-bezier(0.4, 0.1, 0.2, 1),
    transform 0.6s;
}
.pola3.out {
  clip-path: inset(0 0 0 0);
}
.pola3 .shot {
  position: relative;
  width: 224px;
  height: 224px;
  overflow: hidden;
  background: #2b2420;
  touch-action: none;
}
.pola3 .shot canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: brightness(0.08) sepia(1) contrast(0.5) blur(2px);
  opacity: 0.5;
  transition:
    filter 4.5s ease-out,
    opacity 3s ease-out;
}
.pola3.dev .shot canvas {
  filter: none;
  opacity: 1;
}
.pola3 .cap {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font:
    28px 'Princess Sofia',
    cursive;
  color: var(--choco);
}
.tray3 {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 12px;
  width: 100%;
  max-width: 230px;
}
.tray3.on {
  display: grid;
}
.tray3 button {
  border: 0;
  background: #fff;
  border-radius: 10px;
  padding: 4px;
  aspect-ratio: 1;
  cursor: grab;
  box-shadow: inset 0 0 0 2px var(--mint);
  touch-action: none;
}
.tray3 button svg {
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.out3 .acts2 {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.out3 .acts2 .btn {
  padding: 9px 14px;
  font-size: 14px;
}
.hidden-file {
  display: none;
}
@media (max-width: 640px) {
  .tray3 {
    grid-template-columns: repeat(8, 1fr);
    max-width: 320px;
  }
  .booth3 {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .camera3 {
    width: 280px;
  }
  .vf {
    width: 240px;
    height: 240px;
  }
}
