:root {
  --ink: #17150f;
  --paper: #f8f2df;
  --paper-deep: #eee3c1;
  --yellow: #f6d642;
  --red: #e5483f;
  --blue: #2b68b8;
  --sky: #9eddf0;
  --green: #78a95d;
  --white: #fffdf5;
  --shadow: 7px 8px 0 var(--ink);
  --scribble: "Chalkboard SE", "Marker Felt", "Comic Sans MS", cursive;
  --editorial: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 12%, rgba(229, 72, 63, 0.13), transparent 22rem),
    linear-gradient(90deg, transparent 49.5%, rgba(23, 21, 15, 0.045) 50%, transparent 50.5%),
    var(--paper);
  font-family: var(--scribble);
  min-width: 320px;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 4px;
}

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 84px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px clamp(16px, 4vw, 56px);
  background: rgba(248, 242, 223, 0.93);
  border-bottom: 3px solid var(--ink);
  backdrop-filter: blur(10px);
}

.brand,
.sound-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  padding: 0;
  text-align: left;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.05em;
  line-height: 1;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 49% 51% 45% 55%;
  background: var(--white);
  transform: rotate(-7deg);
}

.brand-mark::after {
  content: "";
  width: 12px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  transform: translateX(15px) rotate(18deg);
}

.issue-stamp {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 12px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  transform: rotate(-2deg);
  font-size: 12px;
  font-weight: 800;
}

.issue-stamp strong {
  padding-left: 8px;
  border-left: 2px solid var(--ink);
  font-family: var(--editorial);
  font-size: 26px;
}

.sound-toggle {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}

.sound-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  box-shadow: 2px 2px 0 var(--ink);
}

.sound-toggle[aria-pressed="true"] .sound-icon {
  background: var(--blue);
}

.view {
  min-height: calc(100vh - 84px);
}

.view[hidden],
[hidden] {
  display: none !important;
}

.party-view {
  position: relative;
  padding: clamp(36px, 5vw, 74px) clamp(16px, 4vw, 60px) 80px;
  overflow: hidden;
}

.party-intro {
  position: relative;
  z-index: 2;
  max-width: 740px;
}

.eyebrow {
  margin: 0 0 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  font-size: 12px;
}

h1,
h2,
h3,
p {
  text-wrap: balance;
}

h1,
h2 {
  margin: 0;
  font-family: var(--editorial);
  font-size: clamp(42px, 6.8vw, 92px);
  line-height: 0.96;
  font-weight: 700;
  letter-spacing: -0.055em;
}

h1 em,
h2 em {
  color: var(--red);
  font-weight: inherit;
  text-decoration: underline wavy 3px var(--ink);
  text-underline-offset: 10px;
}

.party-hint {
  max-width: 520px;
  margin: 28px 0 0;
  font-size: 16px;
  line-height: 1.6;
}

.wish-counter {
  display: inline-block;
  margin-top: 18px;
  padding: 9px 14px;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(1deg);
  font-weight: 900;
}

.wish-counter span:first-child {
  color: var(--red);
  font-size: 23px;
}

.party-stage {
  position: relative;
  min-height: 760px;
  max-width: 1240px;
  margin: -44px auto 0;
  background:
    radial-gradient(circle at center, rgba(255,255,255,.9) 0 17%, transparent 17.4%),
    radial-gradient(circle at center, rgba(246,214,66,.4) 0 39%, transparent 39.4%),
    repeating-radial-gradient(circle at center, transparent 0 22px, rgba(23,21,15,.055) 23px 24px);
  border-radius: 50%;
}

.party-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(78vw, 790px);
  height: 310px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background:
    repeating-linear-gradient(90deg, transparent 0 50px, rgba(23,21,15,.06) 51px 52px),
    var(--yellow);
  transform: translate(-50%, -50%) rotate(-1deg);
  box-shadow: 10px 13px 0 rgba(23, 21, 15, 0.16);
}

.balloon {
  position: absolute;
  width: 74px;
  height: 92px;
  border: 3px solid var(--ink);
  border-radius: 50% 48% 46% 53%;
  z-index: 0;
  animation: float 3.8s ease-in-out infinite;
}

.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 88px;
  width: 2px;
  height: 110px;
  background: var(--ink);
  transform: rotate(7deg);
  transform-origin: top;
}

.balloon-red { left: 3%; top: 18%; background: var(--red); }
.balloon-blue { right: 5%; top: 9%; background: var(--blue); animation-delay: -.7s; }
.balloon-yellow { right: 12%; bottom: 12%; background: var(--yellow); animation-delay: -1.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

.character-ring {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.character {
  position: absolute;
  width: 132px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 180ms ease;
}

.character:hover,
.character:focus-visible {
  transform: translateY(-9px) rotate(var(--tilt, -2deg));
}

.character.is-heard .character-name::after {
  content: " ✓";
  color: var(--red);
}

.character-avatar {
  position: relative;
  display: block;
  width: 96px;
  height: 104px;
  margin: 0 auto -6px;
}

.character-head {
  position: absolute;
  left: 14px;
  top: 4px;
  width: 72px;
  height: 76px;
  border: 3px solid var(--ink);
  border-radius: 48% 52% 46% 54%;
  background: #f4c99d;
  z-index: 2;
}

.character-head::before {
  content: "··";
  position: absolute;
  top: 24px;
  left: 23px;
  font: 900 20px/1 var(--editorial);
  letter-spacing: 8px;
}

.character-head::after {
  content: "⌣";
  position: absolute;
  left: 29px;
  top: 39px;
  font-size: 25px;
  transform: rotate(4deg);
}

.character-hair {
  position: absolute;
  left: 15px;
  top: 0;
  width: 75px;
  height: 33px;
  z-index: 3;
  border-top: 9px solid var(--hair, var(--ink));
  border-radius: 45% 60% 0 0;
  transform: rotate(-5deg);
}

.character-hair::after {
  content: "";
  position: absolute;
  right: 3px;
  top: -4px;
  width: 19px;
  height: 36px;
  border-right: 8px solid var(--hair, var(--ink));
  border-radius: 50%;
  transform: rotate(21deg);
}

.character-body {
  position: absolute;
  left: 23px;
  top: 68px;
  width: 56px;
  height: 36px;
  border: 3px solid var(--ink);
  border-radius: 45% 45% 12% 12%;
  background: var(--shirt, var(--yellow));
}

.character-name {
  position: relative;
  z-index: 5;
  display: inline-block;
  padding: 5px 8px;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.character[data-character="snoopy"] .character-head {
  width: 84px;
  height: 56px;
  left: 5px;
  top: 20px;
  background: var(--white);
  border-radius: 50% 56% 48% 48%;
}

.character[data-character="snoopy"] .character-head::before {
  content: "•";
  top: 8px;
  left: 53px;
  font-size: 26px;
  letter-spacing: 0;
}

.character[data-character="snoopy"] .character-head::after {
  content: "";
  left: 66px;
  top: 17px;
  width: 22px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
}

.character[data-character="snoopy"] .character-hair {
  left: 4px;
  top: 34px;
  width: 26px;
  height: 48px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
  transform: rotate(18deg);
}

.character[data-character="woodstock"] .character-head {
  width: 48px;
  height: 54px;
  left: 28px;
  top: 21px;
  background: var(--yellow);
  border-radius: 57% 42% 49% 54%;
}

.character[data-character="woodstock"] .character-head::before {
  content: "•";
  left: 31px;
  top: 8px;
  letter-spacing: 0;
}

.character[data-character="woodstock"] .character-head::after {
  content: "";
  left: 40px;
  top: 23px;
  width: 17px;
  height: 7px;
  border: 2px solid var(--ink);
  border-left: 0;
  background: var(--yellow);
  transform: rotate(-8deg);
}

.character[data-character="woodstock"] .character-hair {
  left: 37px;
  top: 11px;
  width: 36px;
  height: 23px;
  border-top: 4px solid var(--ink);
  border-radius: 50%;
  transform: rotate(-30deg);
}

.cake-card {
  position: absolute;
  left: 50%;
  top: 48%;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
  width: 250px;
  min-height: 265px;
  padding: 16px;
  border: 4px solid var(--ink);
  background: var(--white);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%) rotate(1.5deg);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.cake-card:hover {
  transform: translate(-50%, -53%) rotate(-1deg);
  box-shadow: 11px 14px 0 var(--ink);
}

.cake-flag {
  position: absolute;
  right: -30px;
  top: -20px;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 900;
  transform: rotate(7deg);
}

.cake-art {
  position: relative;
  grid-column: 1 / -1;
  width: 205px;
  height: 174px;
  margin: auto;
}

.cake-layer,
.cake-top,
.cake-plate {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 3px solid var(--ink);
}

.cake-top {
  bottom: 80px;
  width: 144px;
  height: 35px;
  border-radius: 50%;
  background: var(--white);
  z-index: 3;
}

.cake-layer-one {
  bottom: 43px;
  width: 146px;
  height: 58px;
  background: var(--red);
  border-radius: 0 0 14px 14px;
}

.cake-layer-two {
  bottom: 13px;
  width: 184px;
  height: 58px;
  background: var(--yellow);
  border-radius: 9px 9px 16px 16px;
}

.cake-plate {
  bottom: 1px;
  width: 202px;
  height: 21px;
  border-radius: 50%;
  background: var(--sky);
}

.cake-candle {
  position: absolute;
  top: 4px;
  z-index: 5;
  color: var(--blue);
  font-family: var(--editorial);
  font-size: 58px;
  font-weight: 900;
  line-height: 1;
  -webkit-text-stroke: 2px var(--ink);
}

.cake-candle i {
  position: absolute;
  left: 50%;
  top: -13px;
  width: 12px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 50% 50% 45% 45%;
  background: var(--yellow);
  transform: translateX(-50%);
  animation: flicker .65s ease-in-out infinite alternate;
}

.mini-seven { left: 71px; }
.mini-six { left: 110px; color: var(--red); }

@keyframes flicker {
  to { transform: translateX(-50%) scale(.8) rotate(5deg); }
}

.cake-copy {
  grid-column: 1 / -1;
  display: block;
  border-top: 2px solid var(--ink);
  padding-top: 9px;
  text-align: left;
  font-size: 12px;
  line-height: 1.25;
}

.cake-copy b {
  font-size: 18px;
}

.speech-pop {
  position: absolute;
  left: 50%;
  top: 13%;
  z-index: 20;
  width: min(420px, 88vw);
  padding: 18px 48px 18px 20px;
  border: 4px solid var(--ink);
  border-radius: 50% 48% 50% 45%;
  background: var(--white);
  box-shadow: 7px 8px 0 var(--red);
  transform: translateX(-50%) rotate(-1deg);
  animation: pop-in 220ms cubic-bezier(.2, .9, .2, 1.4);
}

.speech-pop::after {
  content: "";
  position: absolute;
  left: 45%;
  bottom: -18px;
  width: 28px;
  height: 28px;
  border-right: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  background: var(--white);
  transform: rotate(45deg);
}

@keyframes pop-in {
  from { opacity: 0; transform: translateX(-50%) scale(.6) rotate(4deg); }
}

.speech-name {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.speech-text {
  margin: 5px 0 0;
  font-family: var(--editorial);
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.15;
}

.speech-close {
  position: absolute;
  right: 14px;
  top: 10px;
  border: 0;
  background: transparent;
  font-size: 27px;
  cursor: pointer;
}

.camera-ticket {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(330px, 90vw);
  margin: -38px auto 0;
  padding: 15px 24px;
  border: 3px solid var(--ink);
  background: var(--blue);
  color: var(--white);
  box-shadow: 6px 7px 0 var(--ink);
  transform: rotate(-1deg);
  cursor: pointer;
}

.camera-ticket span { font-size: 11px; }
.camera-ticket strong { font-size: 19px; }

/* Camera */
.camera-view {
  padding: clamp(34px, 5vw, 72px) clamp(16px, 4vw, 60px) 110px;
  background:
    linear-gradient(rgba(248,242,223,.92), rgba(248,242,223,.92)),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(23,21,15,.15) 35px 36px);
}

.camera-heading {
  max-width: 900px;
  margin: 0 auto 45px;
  text-align: center;
}

.camera-heading h2 {
  font-size: clamp(40px, 6vw, 78px);
}

.camera-heading > p:last-child {
  margin: 25px auto 0;
  font-size: 14px;
}

.back-to-party {
  display: block;
  margin: 0 auto 26px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.camera-layout {
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(300px, 470px);
  align-items: center;
  justify-content: center;
  gap: clamp(34px, 7vw, 100px);
}

.camera-machine {
  position: relative;
  padding: 18px 20px 25px;
  border: 5px solid var(--ink);
  border-radius: 28px 31px 21px 24px;
  background: #eee9d9;
  box-shadow: 13px 15px 0 var(--ink);
  transform: rotate(-1deg);
}

.camera-topline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
}

.camera-topline span:last-child { justify-self: end; font-size: 25px; }

.camera-rainbow {
  width: 82px;
  height: 11px;
  background: linear-gradient(90deg, var(--red) 0 25%, var(--yellow) 25% 50%, var(--green) 50% 75%, var(--blue) 75%);
}

.camera-lens-panel {
  position: relative;
  height: 225px;
  margin: 15px -20px 0;
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  background: var(--ink);
}

.viewfinder {
  position: absolute;
  left: 25px;
  top: 23px;
  width: 65px;
  height: 48px;
  border: 5px solid #cfcbbb;
  border-radius: 6px;
  background: #26393c;
  box-shadow: inset 0 0 0 3px var(--ink);
}

.camera-lens {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 145px;
  height: 145px;
  border: 10px solid #b8b4a6;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #294657 0 18px, #0e1215 19px 30px);
  box-shadow: 0 0 0 4px var(--white), 0 0 0 9px var(--ink);
  transform: translate(-50%, -50%);
}

.camera-lens i {
  position: absolute;
  right: 25px;
  top: 21px;
  width: 29px;
  height: 17px;
  border-radius: 50%;
  background: rgba(255,255,255,.75);
  transform: rotate(-35deg);
}

.camera-shutter {
  position: absolute;
  right: 28px;
  top: 28px;
  width: 65px;
  height: 65px;
  border: 4px solid var(--white);
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px var(--ink), 4px 4px 0 var(--white);
  cursor: pointer;
}

.camera-shutter:disabled { filter: grayscale(1); cursor: not-allowed; opacity: .6; }
.camera-shutter:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 4px var(--ink); }

.camera-controls {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.primary-control,
.secondary-control {
  min-height: 44px;
  padding: 10px 16px;
  border: 3px solid var(--ink);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.primary-control {
  background: var(--yellow);
  box-shadow: 3px 4px 0 var(--ink);
}

.secondary-control { background: var(--white); }
.secondary-control:disabled { opacity: .45; cursor: not-allowed; }

.permission-note {
  min-height: 34px;
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.5;
}

.camera-slot {
  height: 17px;
  margin: 18px 28px 0;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: #727067;
  overflow: hidden;
}

.camera-slot span { display: block; height: 4px; background: #090909; }

.polaroid-workbench {
  position: relative;
}

.live-polaroid {
  width: min(100%, 450px);
  padding: 15px 15px 58px;
  border: 3px solid var(--ink);
  background: var(--white);
  box-shadow: 11px 13px 0 rgba(23,21,15,.25);
  transform: rotate(2deg);
}

.photo-stage,
.captured-stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--sky);
}

.photo-stage video,
.captured-stage > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  filter: var(--photo-filter, none);
}

.selected-frame,
.captured-stage > img:last-child {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.camera-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, var(--white) 0 17%, transparent 17.5%),
    repeating-linear-gradient(135deg, var(--yellow) 0 22px, #f1c83b 23px 44px);
}

.camera-placeholder small { font-size: 11px; }
.placeholder-dog { font-size: 46px; }

.develop-flash {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: var(--white);
  opacity: 0;
}

.develop-flash.is-flashing { animation: camera-flash .7s ease-out; }

@keyframes camera-flash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.polaroid-caption {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  padding: 17px 4px 0;
}

.polaroid-caption span { font-size: 14px; font-weight: 900; }
.polaroid-caption time { font-size: 9px; letter-spacing: .08em; }

.filter-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 30px 0 0;
}

.filter-panel > span { font-size: 10px; font-weight: 900; }

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip,
.frame-tabs button {
  padding: 7px 10px;
  border: 2px solid var(--ink);
  background: var(--white);
  font-size: 11px;
  cursor: pointer;
}

.filter-chip.is-active,
.frame-tabs button.is-active {
  background: var(--ink);
  color: var(--white);
}

.frame-library {
  max-width: 1120px;
  margin: 110px auto 0;
  padding-top: 26px;
  border-top: 4px solid var(--ink);
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.section-title-row h3,
.result-copy h3 {
  margin: 0;
  font-family: var(--editorial);
  font-size: clamp(32px, 4.5vw, 55px);
  line-height: 1;
}

.frame-tabs { display: flex; gap: 7px; }

.frame-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(135px, 175px);
  gap: 18px;
  margin-top: 24px;
  padding: 10px 8px 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.frame-option {
  scroll-snap-align: start;
  padding: 9px 9px 12px;
  border: 3px solid var(--ink);
  background: var(--white);
  box-shadow: 4px 5px 0 rgba(23,21,15,.22);
  cursor: pointer;
  transform: rotate(var(--frame-tilt, -1deg));
}

.frame-option.is-selected { box-shadow: 5px 6px 0 var(--red); transform: translateY(-5px) rotate(1deg); }

.frame-option img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: repeating-conic-gradient(#e4dfd0 0 25%, #fff 0 50%) 50% / 18px 18px;
}

.frame-option span {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 800;
}

.result-section {
  max-width: 980px;
  margin: 100px auto 0;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 430px);
  align-items: center;
  gap: clamp(40px, 8vw, 100px);
  padding: 60px 0;
  border-top: 4px dashed var(--ink);
}

.result-copy > p:not(.eyebrow) { max-width: 330px; line-height: 1.6; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.flip-card {
  width: 100%;
  aspect-ratio: .88;
  padding: 0;
  border: 0;
  background: transparent;
  perspective: 1200px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
  transform-style: preserve-3d;
}

.flip-card.is-flipped .flip-card-inner { transform: rotateY(180deg); }

.flip-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  backface-visibility: hidden;
  border: 3px solid var(--ink);
  background: var(--white);
  box-shadow: 10px 12px 0 var(--ink);
}

.flip-front { padding: 15px 15px 60px; transform: rotate(-2deg); }
.flip-back {
  justify-content: center;
  align-items: center;
  padding: 42px;
  transform: rotateY(180deg) rotate(1deg);
  text-align: center;
  background:
    linear-gradient(rgba(255,253,245,.92), rgba(255,253,245,.92)),
    repeating-linear-gradient(0deg, transparent 0 26px, var(--sky) 27px 28px);
}

.captured-date { margin-top: 20px; font-size: 11px; }
.flip-back small { font-size: 10px; letter-spacing: .12em; font-weight: 900; }
.flip-back q { margin: 30px 0; font-family: var(--editorial); font-size: clamp(22px, 3vw, 34px); line-height: 1.15; }
.snoopy-signature { align-self: flex-end; font-weight: 900; transform: rotate(-6deg); }
.flip-hint { margin-top: 40px; font-size: 9px; opacity: .55; }
.paw-stamp { display: grid; place-items: center; width: 60px; aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 50%; background: var(--yellow); font-size: 30px; }

/* Candle ritual */
.cake-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  padding: 25px clamp(16px, 4vw, 60px);
  overflow-y: auto;
  color: var(--white);
  background:
    radial-gradient(circle at 50% 58%, rgba(246,214,66,.16), transparent 23%),
    #111117;
}

.cake-modal::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle, transparent 0 35%, rgba(0,0,0,.62) 80%);
}

.modal-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,.35);
}

.modal-topbar h2 { font-size: clamp(28px, 4vw, 54px); letter-spacing: -.04em; }
.modal-kicker { color: var(--yellow); font-size: 10px; letter-spacing: .14em; font-weight: 900; }
.modal-close { border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: transparent; color: var(--white); width: 43px; height: 43px; font-size: 26px; cursor: pointer; }

.ritual-stage {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 130px);
  display: grid;
  place-items: center;
  align-content: center;
  padding: 100px 0 70px;
}

.woodstock-flight {
  position: absolute;
  left: -15%;
  top: 13%;
  display: flex;
  align-items: center;
  gap: 20px;
  animation: woodstock-delivery 2.4s cubic-bezier(.2,.7,.2,1) forwards;
}

.woodstock-body {
  display: grid;
  place-items: center;
  width: 78px;
  height: 67px;
  border: 3px solid var(--ink);
  border-radius: 55% 43% 51% 45%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 35px;
  transform: rotate(13deg);
}

.lighter-trail { width: 160px; border-top: 3px dashed rgba(255,255,255,.7); }

@keyframes woodstock-delivery {
  0% { left: -15%; transform: translateY(-40px) rotate(-4deg); }
  65% { left: 52%; transform: translateY(25px) rotate(8deg); }
  100% { left: 72%; transform: translateY(0) rotate(-2deg); }
}

.lighter-pickup {
  position: absolute;
  top: 25%;
  right: 10%;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: 230px;
  padding: 11px 15px;
  border: 2px solid var(--white);
  background: var(--red);
  color: var(--white);
  box-shadow: 5px 5px 0 var(--white);
  cursor: pointer;
  animation: pickup-appear .5s 1.8s both;
}

@keyframes pickup-appear { from { opacity: 0; transform: scale(.5); } }

.lighter-icon {
  position: relative;
  display: block;
  width: 25px;
  height: 43px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: var(--yellow);
}

.lighter-icon i {
  position: absolute;
  left: 50%;
  top: -19px;
  width: 13px;
  height: 20px;
  border-radius: 50% 50% 45%;
  background: #ff7b37;
  transform: translateX(-50%);
  box-shadow: 0 0 20px var(--yellow);
}

.ritual-stage.has-lighter { cursor: crosshair; }
.ritual-stage.has-lighter .lighter-pickup { opacity: 0; pointer-events: none; }

.ritual-cake {
  position: relative;
  width: min(520px, 88vw);
  height: 360px;
  margin-top: 80px;
}

.number-candles {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 0;
  display: flex;
  gap: 12px;
  transform: translateX(-50%);
}

.number-candle {
  position: relative;
  width: 90px;
  height: 142px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
}

.number-candle[data-candle="6"] { color: var(--red); }
.number-candle span { font-family: var(--editorial); font-size: 130px; line-height: 1; font-weight: 900; -webkit-text-stroke: 3px var(--white); text-shadow: 4px 4px 0 var(--ink); }
.number-candle:disabled { cursor: default; }

.flame {
  position: absolute;
  left: 50%;
  top: -24px;
  width: 24px;
  height: 36px;
  border-radius: 50% 50% 45% 45%;
  background: #ff8d35;
  box-shadow: 0 0 10px #ff9d2e, 0 0 35px var(--yellow), 0 0 75px rgba(246,214,66,.55);
  opacity: 0;
  transform: translateX(-50%) scale(.4);
  transition: opacity .3s, transform .3s;
}

.number-candle.is-lit .flame { opacity: 1; transform: translateX(-50%) scale(1); animation: flame-dance .6s ease-in-out infinite alternate; }
.number-candle.is-out .flame { opacity: 0; transform: translate(-30px, -20px) scale(.1); }

@keyframes flame-dance { to { transform: translateX(-50%) scale(.82, 1.12) rotate(7deg); } }

.ritual-frosting,
.ritual-cake-body,
.ritual-cake-plate { position: absolute; left: 50%; transform: translateX(-50%); }
.ritual-frosting { top: 129px; z-index: 3; width: 390px; height: 75px; border: 4px solid var(--ink); border-radius: 50%; background: var(--white); }
.ritual-cake-body { top: 165px; width: 390px; height: 142px; display: grid; place-items: center; border: 4px solid var(--ink); border-radius: 0 0 34px 34px; background: var(--red); color: var(--white); font-size: 14px; letter-spacing: .12em; font-weight: 900; }
.ritual-cake-body::before { content: ""; position: absolute; inset: 34px 0 auto; height: 28px; background: var(--yellow); border-block: 3px solid var(--ink); }
.ritual-cake-plate { top: 288px; width: 480px; height: 45px; border: 4px solid var(--ink); border-radius: 50%; background: var(--sky); }

.ritual-instruction {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 560px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.35);
}

.ritual-instruction span { display: grid; place-items: center; min-width: 48px; height: 48px; border: 2px solid var(--yellow); border-radius: 50%; color: var(--yellow); font-weight: 900; }
.ritual-instruction p { margin: 0; line-height: 1.6; }

.blow-controls {
  width: min(520px, 88vw);
  margin-top: 24px;
  text-align: center;
}

.blow-button {
  position: relative;
  width: 100%;
  min-height: 58px;
  border: 2px solid var(--white);
  background: var(--blue);
  color: var(--white);
  cursor: pointer;
}

.blow-meter { height: 12px; margin-top: 13px; border: 2px solid var(--white); }
.blow-meter i { display: block; width: 0; height: 100%; background: var(--yellow); transition: width 80ms linear; }
.tap-fallback { margin-top: 13px; border: 0; border-bottom: 1px solid rgba(255,255,255,.7); background: transparent; color: rgba(255,255,255,.8); font-size: 11px; cursor: pointer; }

.wish-complete {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 30px;
  text-align: center;
  background: rgba(17,17,23,.88);
  animation: complete-in .7s ease both;
}

@keyframes complete-in { from { opacity: 0; } }
.big-scribble { color: var(--yellow); font-family: var(--editorial); font-size: clamp(48px, 9vw, 125px); font-weight: 900; letter-spacing: -.08em; transform: rotate(-3deg); }
.wish-complete h3 { margin: 20px 0 35px; font-family: var(--editorial); font-size: clamp(28px, 4vw, 48px); line-height: 1.05; }

body.modal-open { overflow: hidden; }

@media (max-width: 900px) {
  .party-stage { min-height: 900px; margin-top: 20px; }
  .party-stage::before { width: 88%; height: 390px; }
  .character { width: 105px; }
  .character-avatar { transform: scale(.82); transform-origin: bottom; }
  .cake-card { width: 220px; }
  .camera-layout,
  .result-section { grid-template-columns: minmax(0, 520px); }
  .camera-machine { order: 2; }
  .polaroid-workbench { order: 1; }
  .live-polaroid { margin: auto; }
  .filter-panel { justify-content: center; }
  .result-copy { text-align: center; }
  .result-copy > p:not(.eyebrow) { margin-inline: auto; }
  .result-actions { justify-content: center; }
  .section-title-row { align-items: start; flex-direction: column; }
  .lighter-pickup { right: 4%; top: 28%; }
}

@media (max-width: 620px) {
  .site-header { min-height: 68px; padding-inline: 12px; }
  .sound-label { display: none; }
  .issue-stamp span { display: none; }
  .party-view { padding-inline: 12px; }
  .party-intro { padding-inline: 8px; }
  .party-stage { min-height: 860px; margin-inline: -8px; }
  .party-stage::before { top: 50%; width: 91%; height: 350px; }
  .cake-card { top: 50%; transform: translate(-50%, -50%) scale(.84) rotate(1deg); }
  .cake-card:hover { transform: translate(-50%, -52%) scale(.84) rotate(-1deg); }
  .character { width: 88px; }
  .character-avatar { transform: scale(.72); margin-bottom: -14px; }
  .character-name { max-width: 88px; padding: 4px 5px; font-size: 8px; }
  .camera-ticket { margin-top: -75px; }
  .camera-view { padding-inline: 14px; }
  .camera-machine { transform: none; box-shadow: 7px 8px 0 var(--ink); }
  .camera-shutter { right: 18px; }
  .camera-controls { flex-direction: column; }
  .camera-layout { gap: 60px; }
  .frame-library { margin-top: 80px; }
  .frame-tabs { width: 100%; }
  .frame-tabs button { flex: 1; }
  .result-section { margin-top: 70px; }
  .flip-card { max-width: 420px; margin: auto; }
  .modal-topbar h2 { font-size: 27px; }
  .ritual-stage { padding-top: 130px; }
  .woodstock-flight { top: 8%; transform: scale(.75); }
  .lighter-pickup { top: 21%; max-width: 175px; font-size: 10px; }
  .ritual-cake { transform: scale(.8); margin-block: 30px -30px; }
  .ritual-instruction { margin-top: 0; }
}

/* Homepage v2 — an interactive Peanuts birthday portrait */
.site-header {
  min-height: 68px;
  padding: 8px clamp(14px, 3vw, 42px);
  background: rgba(199, 227, 239, 0.94);
  border-bottom-width: 2px;
  backdrop-filter: blur(12px);
}

.party-masthead {
  justify-self: center;
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
  transform: rotate(-1deg);
}

.party-masthead span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.party-masthead h1 {
  margin: 0;
  color: #168bc8;
  font-family: var(--scribble);
  font-size: clamp(18px, 2.2vw, 30px);
  line-height: 1;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.party-view {
  display: grid;
  place-items: start center;
  min-height: calc(100svh - 68px);
  padding: 0;
  background: #c7e3ef;
}

.party-stage {
  position: relative;
  width: min(100%, 1920px);
  min-height: 0;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  background: #c7e3ef;
}

.party-guide {
  position: absolute;
  left: 2.5%;
  top: 3%;
  z-index: 9;
  margin: 0;
  padding: 6px 8px 5px;
  border-bottom: 2px solid rgba(23, 21, 15, 0.68);
  background: rgba(199, 227, 239, 0.74);
  font-size: clamp(7px, 0.72vw, 10px);
  font-weight: 900;
  letter-spacing: 0.1em;
  pointer-events: none;
}

.party-guide span {
  color: var(--red);
}

.party-stage .character {
  border: 0;
  background: transparent;
  isolation: isolate;
  transition: transform 180ms cubic-bezier(.2, .8, .2, 1);
}

.party-stage .character::before,
.party-stage .character::after {
  content: "";
  position: absolute;
  inset: 8%;
  z-index: -1;
  border: 2px dashed rgba(23, 21, 15, 0.72);
  border-radius: 50%;
  opacity: 0;
  transform: scale(.72) rotate(-8deg);
  transition: opacity 140ms ease, transform 180ms ease;
}

.party-stage .character::after {
  inset: 13%;
  border-color: rgba(255, 253, 245, 0.92);
  transform: scale(.72) rotate(8deg);
}

.party-stage .character:hover,
.party-stage .character:focus-visible {
  z-index: 30;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%) scale(1.035);
}

.party-stage .character:hover::before,
.party-stage .character:hover::after,
.party-stage .character:focus-visible::before,
.party-stage .character:focus-visible::after {
  opacity: 1;
  transform: scale(1) rotate(-3deg);
}

.party-stage .character:hover::after,
.party-stage .character:focus-visible::after {
  transform: scale(1) rotate(3deg);
}

.character-hover {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  z-index: 50;
  display: grid;
  width: clamp(220px, 21vw, 310px);
  padding: 12px 14px 10px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background:
    linear-gradient(rgba(255, 253, 245, .94), rgba(255, 253, 245, .94)),
    repeating-linear-gradient(0deg, transparent 0 20px, rgba(43, 104, 184, .15) 21px 22px);
  box-shadow: 4px 5px 0 rgba(23, 21, 15, 0.9);
  opacity: 0;
  visibility: hidden;
  text-align: left;
  pointer-events: none;
  transform: translateY(-50%) translateX(-7px) rotate(-1deg);
  transition: opacity 140ms ease, transform 180ms ease, visibility 140ms ease;
}

.character-hover strong {
  color: var(--red);
  font-size: clamp(11px, 1vw, 14px);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.character-hover q {
  margin-top: 7px;
  font-family: var(--editorial);
  font-size: clamp(12px, 1.18vw, 17px);
  font-weight: 700;
  line-height: 1.22;
}

.character-hover small {
  margin-top: 9px;
  padding-top: 6px;
  border-top: 1px solid rgba(23, 21, 15, .34);
  font-size: clamp(6px, .56vw, 8px);
  font-weight: 900;
  letter-spacing: .11em;
}

.party-stage .character:hover .character-hover,
.party-stage .character:focus-visible .character-hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0) rotate(-1deg);
}

.party-stage .character[data-side="left"] .character-hover {
  right: calc(100% + 10px);
  left: auto;
  transform: translateY(-50%) translateX(7px) rotate(1deg);
}

.party-stage .character[data-side="left"]:hover .character-hover,
.party-stage .character[data-side="left"]:focus-visible .character-hover {
  transform: translateY(-50%) translateX(0) rotate(1deg);
}

.party-stage .character[data-vertical="down"] .character-hover {
  left: 50%;
  right: auto;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-7px) rotate(-1deg);
}

.party-stage .character[data-vertical="down"]:hover .character-hover,
.party-stage .character[data-vertical="down"]:focus-visible .character-hover {
  transform: translateX(-50%) translateY(0) rotate(-1deg);
}

.party-stage .character[data-vertical="up"] .character-hover {
  left: 50%;
  right: auto;
  top: auto;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(7px) rotate(1deg);
}

.party-stage .character[data-vertical="up"]:hover .character-hover,
.party-stage .character[data-vertical="up"]:focus-visible .character-hover {
  transform: translateX(-50%) translateY(0) rotate(1deg);
}

.party-stage .cake-copy {
  bottom: 1%;
  padding: 7px 11px 6px;
  opacity: 0;
  transform: translateX(-50%) translateY(6px) rotate(-1deg);
  transition: opacity 140ms ease, transform 180ms ease;
}

.party-stage .cake-card:hover .cake-copy,
.party-stage .cake-card:focus-visible .cake-copy {
  opacity: 1;
  transform: translateX(-50%) translateY(0) rotate(-1deg);
}

.party-camera-link {
  position: absolute;
  left: 2.5%;
  bottom: 4%;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 2px solid var(--ink);
  background: rgba(255, 253, 245, .92);
  box-shadow: 3px 4px 0 var(--ink);
  font-size: clamp(8px, .78vw, 11px);
  font-weight: 900;
  letter-spacing: .08em;
  cursor: pointer;
  transform: rotate(-1deg);
  transition: transform 140ms ease, background-color 140ms ease;
}

.party-camera-link span {
  color: var(--red);
  font-size: 16px;
}

.party-camera-link:hover,
.party-camera-link:focus-visible {
  background: var(--yellow);
  transform: translateY(-3px) rotate(1deg);
}

body.card-is-open {
  overflow: hidden;
}

.birthday-card-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 28px;
  opacity: 0;
  transition: opacity 220ms ease;
}

.birthday-card-modal.is-open {
  opacity: 1;
}

.card-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(44, 74, 88, .74);
  backdrop-filter: blur(5px) saturate(.72);
  cursor: zoom-out;
}

.birthday-card {
  --card-accent: #f6d642;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(245px, .78fr) minmax(350px, 1.22fr);
  width: min(900px, calc(100vw - 56px));
  min-height: 470px;
  filter: drop-shadow(15px 18px 0 rgba(23, 21, 15, .48));
  transform: translateY(22px) scale(.91) rotate(-1.5deg);
  transform-origin: center;
  transition: transform 300ms cubic-bezier(.18, .86, .22, 1.14);
}

.birthday-card-modal.is-open .birthday-card {
  transform: translateY(0) scale(1) rotate(-.35deg);
}

.card-cover,
.card-message {
  position: relative;
  min-width: 0;
  border: 3px solid var(--ink);
  overflow: hidden;
}

.card-cover {
  display: grid;
  place-items: center;
  align-content: center;
  border-right: 0;
  background:
    radial-gradient(circle at 19% 18%, rgba(255,255,255,.42) 0 3px, transparent 4px),
    radial-gradient(circle at 81% 78%, rgba(23,21,15,.18) 0 2px, transparent 3px),
    var(--card-accent);
  background-size: 37px 37px, 29px 29px, auto;
  text-align: center;
}

.card-cover::after {
  content: var(--card-mark);
  position: absolute;
  right: -12px;
  bottom: -34px;
  color: rgba(255, 253, 245, .38);
  font-family: var(--editorial);
  font-size: 160px;
  font-weight: 900;
  line-height: 1;
}

.card-date {
  position: absolute;
  left: 18px;
  top: 18px;
  padding-bottom: 3px;
  border-bottom: 2px solid var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
}

.card-star {
  font-size: 52px;
  line-height: .8;
  transform: rotate(-9deg);
}

.card-cover > strong {
  position: relative;
  z-index: 2;
  font-family: var(--editorial);
  font-size: 110px;
  line-height: .88;
  letter-spacing: -.08em;
  text-shadow: 3px 3px 0 rgba(255, 253, 245, .88);
}

.card-cover > small {
  position: relative;
  z-index: 2;
  margin-top: 15px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: .14em;
}

.card-message {
  display: flex;
  flex-direction: column;
  padding: clamp(35px, 5vw, 64px);
  background:
    linear-gradient(rgba(255, 251, 237, .94), rgba(255, 251, 237, .94)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(43, 104, 184, .17) 32px 33px);
}

.card-message::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(23, 21, 15, .23);
  box-shadow: 5px 0 12px rgba(23, 21, 15, .12);
}

.card-kicker {
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .18em;
}

.card-dear {
  margin: 24px 0 10px;
  font-family: var(--editorial);
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 700;
  transform: rotate(-1deg);
}

.card-message blockquote {
  max-width: 480px;
  margin: 0;
  font-family: var(--editorial);
  font-size: clamp(20px, 2.4vw, 31px);
  font-weight: 700;
  line-height: 1.22;
}

.card-signature {
  display: grid;
  gap: 2px;
  align-self: flex-end;
  min-width: 170px;
  margin-top: auto;
  padding-top: 22px;
  text-align: left;
  transform: rotate(-2deg);
}

.card-signature small {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
}

.card-signature strong {
  color: var(--red);
  font-size: clamp(19px, 2.2vw, 30px);
  line-height: 1;
  text-decoration: underline 2px var(--ink);
  text-underline-offset: 6px;
}

.card-doodle {
  position: absolute;
  left: 36px;
  bottom: 28px;
  color: var(--card-accent);
  font-size: 20px;
  letter-spacing: 5px;
  transform: rotate(4deg);
}

.card-close {
  position: absolute;
  right: -17px;
  top: -17px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0 0 3px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  box-shadow: 2px 3px 0 var(--ink);
  font-size: 25px;
  cursor: pointer;
}

@media (max-width: 700px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
    min-height: 62px;
    padding-inline: 12px;
  }

  .brand {
    font-size: 0;
  }

  .brand-mark {
    width: 34px;
  }

  .party-masthead {
    display: grid;
    gap: 1px;
    text-align: center;
  }

  .party-masthead span {
    font-size: 6px;
  }

  .party-masthead h1 {
    font-size: clamp(13px, 4.2vw, 18px);
    text-underline-offset: 4px;
  }

  .sound-toggle {
    font-size: 0;
  }

  .sound-icon {
    width: 33px;
    height: 33px;
    font-size: 14px;
  }

  .party-view {
    min-height: calc(100svh - 62px);
  }

  .party-guide {
    display: none;
  }

  .party-camera-link {
    left: 12px;
    bottom: 10px;
    padding: 5px 7px;
    font-size: 7px;
  }

  .party-camera-link span {
    font-size: 11px;
  }

  .party-stage .cake-copy {
    display: none;
  }

  .birthday-card-modal {
    align-items: center;
    padding: 20px 16px;
  }

  .birthday-card {
    grid-template-columns: 1fr;
    width: min(430px, calc(100vw - 32px));
    max-height: calc(100dvh - 40px);
    min-height: 0;
    filter: drop-shadow(8px 10px 0 rgba(23, 21, 15, .42));
  }

  .card-cover {
    grid-template-columns: auto auto auto;
    min-height: 126px;
    border-right: 3px solid var(--ink);
    border-bottom: 0;
    padding: 20px 28px;
  }

  .card-cover > strong {
    font-size: 65px;
  }

  .card-cover > small {
    margin: 0;
    font-size: 7px;
  }

  .card-date {
    left: 10px;
    top: 9px;
    font-size: 7px;
  }

  .card-star {
    font-size: 31px;
  }

  .card-message {
    min-height: 350px;
    padding: 28px 25px 30px;
  }

  .card-dear {
    margin-top: 17px;
  }

  .card-message blockquote {
    font-size: clamp(18px, 5.2vw, 23px);
  }

  .card-doodle {
    left: 22px;
    bottom: 20px;
    font-size: 14px;
  }

  .card-close {
    right: -8px;
    top: -10px;
  }
}

/* Camera page v2 — blue instant camera in a hand-inked Peanuts direction. */
.camera-view {
  --camera-sky: #c7e3ef;
  --camera-blue: #5a9fca;
  --camera-blue-deep: #246b9d;
  --camera-blue-light: #a9d7e9;
  --camera-cream: #fffaf0;
  min-height: calc(100svh - 84px);
  padding: clamp(34px, 5vw, 68px) clamp(16px, 4vw, 60px) 120px;
  background-color: var(--camera-sky);
  background-image:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, .42) 0 2px, transparent 2.5px),
    radial-gradient(circle at 88% 28%, rgba(23, 21, 15, .08) 0 1px, transparent 1.5px),
    linear-gradient(rgba(255, 255, 255, .08), rgba(255, 255, 255, .08));
  background-size: 31px 31px, 23px 23px, auto;
}

.camera-view .camera-heading {
  max-width: 760px;
  margin: 0 auto clamp(42px, 6vw, 72px);
}

.camera-view .back-to-party {
  margin-bottom: 30px;
  padding: 8px 12px 6px;
  border: 3px solid var(--ink);
  background: var(--camera-cream);
  box-shadow: 3px 4px 0 var(--ink);
  font-size: 11px;
  letter-spacing: .1em;
  transform: rotate(-1deg);
}

.camera-view .camera-heading .eyebrow {
  margin-bottom: 12px;
  letter-spacing: .19em;
}

.camera-view .camera-heading h2 {
  margin: 0;
  font-family: var(--editorial);
  font-size: clamp(54px, 8vw, 108px);
  line-height: .78;
  letter-spacing: -.075em;
}

.camera-view .camera-heading h2 em {
  color: var(--camera-blue-deep);
  text-decoration: underline wavy var(--ink) 3px;
  text-underline-offset: 10px;
}

.camera-view .camera-heading > p:last-child {
  margin-top: 28px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
}

.camera-view .camera-layout {
  grid-template-columns: minmax(320px, 470px) minmax(300px, 440px);
  gap: clamp(46px, 7vw, 100px);
  align-items: start;
}

.camera-view .camera-machine {
  width: 100%;
  padding: 20px 22px 24px;
  border: 5px solid var(--ink);
  border-radius: 42px 37px 28px 32px;
  background: var(--camera-blue);
  box-shadow: 12px 14px 0 var(--ink);
  transform: rotate(-.7deg);
  isolation: isolate;
}

.camera-view .camera-machine::before {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: -1;
  border: 2px dashed rgba(255, 255, 255, .36);
  border-radius: 32px 29px 22px 25px;
  pointer-events: none;
}

.camera-view .camera-topline {
  min-height: 34px;
  grid-template-columns: 1fr auto 48px;
  color: var(--camera-cream);
  font-size: 12px;
  letter-spacing: .12em;
}

.camera-view .camera-topline span:first-child::before {
  content: "●";
  display: inline-block;
  margin-right: 7px;
  color: var(--ink);
  font-size: 18px;
  transform: scaleX(1.35) rotate(-18deg);
}

.camera-view .camera-topline span:last-child {
  min-width: 44px;
  padding: 1px 5px 0;
  border: 3px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  line-height: 1.1;
  text-align: center;
  transform: rotate(2deg);
}

.camera-view .camera-rainbow {
  width: 74px;
  height: 9px;
  border: 2px solid var(--ink);
  background: linear-gradient(90deg, var(--red) 0 25%, var(--yellow) 25% 52%, var(--camera-cream) 52% 72%, var(--camera-blue-deep) 72%);
}

.camera-view .camera-lens-panel {
  height: 260px;
  margin: 14px -6px 0;
  overflow: hidden;
  border: 4px solid var(--ink);
  border-radius: 25px 22px 16px 19px;
  background: var(--camera-blue-light);
}

.camera-view .camera-lens-panel::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 48px;
  height: 96px;
  border-inline: 3px solid var(--ink);
  background: repeating-linear-gradient(90deg, var(--red) 0 12px, var(--yellow) 12px 24px, var(--camera-cream) 24px 36px, var(--camera-blue-deep) 36px 48px);
  transform: translateX(-50%);
}

.camera-view .camera-flash,
.camera-view .viewfinder {
  position: absolute;
  top: 22px;
  width: 78px;
  height: 64px;
  border: 4px solid var(--ink);
  border-radius: 13px 16px 12px 14px;
  box-shadow: 3px 3px 0 rgba(23, 21, 15, .25);
}

.camera-view .camera-flash {
  left: 20px;
  background:
    repeating-radial-gradient(ellipse at center, transparent 0 6px, rgba(23,21,15,.23) 7px 8px),
    var(--camera-cream);
}

.camera-view .camera-flash i {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 12px;
  border-block: 2px solid var(--ink);
  background: rgba(255,255,255,.78);
  transform: translateY(-50%) rotate(-2deg);
}

.camera-view .viewfinder {
  left: auto;
  right: 20px;
  background: radial-gradient(circle at 55% 45%, #779caf 0 8%, #152b36 9% 45%, #080a0b 46%);
  box-shadow: inset 0 0 0 4px var(--camera-cream), 3px 3px 0 rgba(23, 21, 15, .25);
}

.camera-view .camera-lens {
  top: 52%;
  width: 166px;
  height: 166px;
  border: 12px solid var(--camera-cream);
  background:
    radial-gradient(circle at 42% 38%, rgba(255,255,255,.65) 0 5%, transparent 6%),
    repeating-radial-gradient(circle, #3d829d 0 15px, #183846 16px 28px, #090c0e 29px 39px);
  box-shadow: 0 0 0 5px var(--ink), 7px 8px 0 rgba(23,21,15,.28);
}

.camera-view .camera-lens::after {
  content: "SNOOPY 76";
  position: absolute;
  left: 50%;
  bottom: 17px;
  color: var(--camera-cream);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .14em;
  white-space: nowrap;
  transform: translateX(-50%) rotate(4deg);
}

.camera-view .camera-lens i {
  right: 30px;
  top: 24px;
  width: 31px;
  height: 14px;
}

.camera-view .camera-shutter {
  left: 28px;
  right: auto;
  top: auto;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-color: var(--camera-cream);
  background: var(--red);
  box-shadow: 0 0 0 4px var(--ink), 4px 5px 0 rgba(23,21,15,.32);
}

.camera-view .camera-shutter::after {
  content: "SNAP";
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  color: var(--ink);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
  transform: translateX(-50%);
}

.camera-view .camera-controls {
  margin-top: 18px;
}

.camera-view .primary-control,
.camera-view .secondary-control {
  border-width: 3px;
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: .06em;
}

.camera-view .primary-control {
  background: var(--yellow);
}

.camera-view .secondary-control {
  background: var(--camera-cream);
}

.camera-view .permission-note {
  min-height: 18px;
  margin: 12px 2px 0;
  color: #102e42;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
}

.camera-view .camera-slot {
  height: 22px;
  margin: 16px 24px 0;
  border: 4px solid var(--ink);
  border-radius: 4px 4px 13px 13px;
  background: #183847;
  box-shadow: inset 0 5px 0 #090b0c;
}

.camera-view .polaroid-workbench {
  padding-top: 10px;
}

.camera-view .live-polaroid {
  padding: 14px 14px 56px;
  border: 4px solid var(--ink);
  border-radius: 2px;
  background: var(--camera-cream);
  box-shadow: 10px 12px 0 rgba(23,21,15,.28);
  transform: rotate(1.5deg);
}

.camera-view .camera-placeholder {
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 42%, var(--camera-cream) 0 17%, transparent 17.5%),
    repeating-linear-gradient(135deg, #8fc9e5 0 22px, #76b7d8 23px 44px);
}

.camera-view .placeholder-dog {
  display: inline-block;
  color: var(--ink);
  transform: scaleX(1.45) rotate(-14deg);
}

.camera-view .polaroid-caption span,
.camera-view .polaroid-caption time,
.camera-view .filter-panel > span {
  letter-spacing: .08em;
}

.camera-view .filter-panel {
  align-items: flex-start;
}

.camera-view .filter-chip,
.camera-view .frame-tabs button {
  border: 2px solid var(--ink);
  background: rgba(255,250,240,.86);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .07em;
}

.camera-view .filter-chip.is-active,
.camera-view .frame-tabs button.is-active {
  background: var(--camera-blue-deep);
  color: var(--camera-cream);
}

.camera-view .frame-library {
  margin-top: 105px;
  padding: 30px 24px 8px;
  border: 4px solid var(--ink);
  background: rgba(255,250,240,.32);
  box-shadow: 8px 9px 0 rgba(23,21,15,.18);
}

.camera-view .section-title-row h3,
.camera-view .result-copy h3 {
  font-size: clamp(38px, 5vw, 62px);
  letter-spacing: -.055em;
}

.camera-view .frame-option {
  background: var(--camera-cream);
}

.camera-view .frame-option.is-selected {
  box-shadow: 5px 6px 0 var(--camera-blue-deep);
}

.camera-view .frame-option span {
  letter-spacing: .05em;
}

.camera-view .result-section {
  border-top: 4px dashed var(--camera-blue-deep);
}

@media (max-width: 900px) {
  .camera-view .camera-layout {
    grid-template-columns: minmax(0, 500px);
  }

  .camera-view .camera-machine {
    order: 1;
  }

  .camera-view .polaroid-workbench {
    order: 2;
  }
}

@media (max-width: 620px) {
  .camera-view {
    min-height: calc(100svh - 68px);
    padding: 28px 14px 90px;
  }

  .camera-view .camera-heading {
    margin-bottom: 42px;
  }

  .camera-view .camera-heading h2 {
    font-size: clamp(52px, 17vw, 72px);
  }

  .camera-view .camera-heading h2 em {
    text-underline-offset: 6px;
  }

  .camera-view .camera-machine {
    padding: 16px 15px 20px;
    border-width: 4px;
    border-radius: 31px 28px 23px 25px;
    box-shadow: 7px 8px 0 var(--ink);
  }

  .camera-view .camera-topline {
    grid-template-columns: 1fr 54px 42px;
    font-size: 9px;
  }

  .camera-view .camera-rainbow {
    width: 54px;
  }

  .camera-view .camera-lens-panel {
    height: 224px;
  }

  .camera-view .camera-flash,
  .camera-view .viewfinder {
    top: 18px;
    width: 63px;
    height: 54px;
  }

  .camera-view .camera-flash {
    left: 14px;
  }

  .camera-view .viewfinder {
    right: 14px;
  }

  .camera-view .camera-lens {
    width: 140px;
    height: 140px;
  }

  .camera-view .camera-shutter {
    left: 20px;
    right: auto;
    bottom: 18px;
    width: 49px;
    height: 49px;
  }

  .camera-view .camera-controls {
    flex-direction: row;
  }

  .camera-view .camera-controls button {
    flex: 1;
    padding-inline: 8px;
  }

  .camera-view .frame-library {
    margin-top: 74px;
    padding: 22px 14px 4px;
  }
}

@media (hover: none) {
  .character-hover {
    display: none;
  }

  .party-stage .character:active::before,
  .party-stage .character:active::after {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .birthday-card-modal,
  .birthday-card,
  .character-hover,
  .party-stage .character {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Illustrated party homepage — selected hero artwork */
.site-header {
  background: rgba(199, 227, 239, 0.94);
}

.party-view {
  padding: 0 0 64px;
  overflow: hidden;
  background-color: #c7e3ef;
  background-image:
    linear-gradient(rgba(199, 227, 239, 0.96), rgba(199, 227, 239, 0.96)),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='.12'/%3E%3C/svg%3E");
}

.party-intro {
  position: relative;
  z-index: 16;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  width: min(100%, 1920px);
  max-width: none;
  margin: 0 auto;
  padding: 24px clamp(18px, 4vw, 72px) 22px;
  border-bottom: 2px solid rgba(23, 21, 15, 0.52);
  background: rgba(199, 227, 239, 0.9);
}

.party-title-lockup {
  min-width: 0;
}

.party-intro .eyebrow {
  margin-bottom: 7px;
  font-size: 10px;
  letter-spacing: 0.16em;
}

.party-intro h1 {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.party-intro h1 em {
  color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.party-hint {
  max-width: none;
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

.party-quick-actions {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex: 0 0 auto;
}

.party-intro .wish-counter {
  display: grid;
  place-items: center;
  min-width: 114px;
  margin: 0;
  padding: 8px 13px;
  background: rgba(255, 253, 245, 0.91);
  transform: rotate(-1deg);
}

.party-intro .camera-ticket {
  width: auto;
  min-width: 160px;
  margin: 0;
  padding: 10px 17px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 4px 5px 0 var(--ink);
  transform: rotate(1deg);
}

.party-intro .camera-ticket span {
  font-size: 9px;
}

.party-intro .camera-ticket strong {
  font-size: 15px;
}

.party-stage {
  position: relative;
  width: min(100%, 1920px);
  min-height: 0;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 0;
  background: #c7e3ef;
}

.party-stage::before,
.party-stage > .balloon {
  display: none;
}

.party-hero-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.character-ring {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.party-stage .character {
  position: absolute;
  width: 9.5%;
  height: 20%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: transparent;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.party-stage .character:hover,
.party-stage .character:focus-visible {
  border-color: rgba(23, 21, 15, 0.68);
  background: rgba(255, 253, 245, 0.12);
  transform: translate(-50%, -50%) scale(1.05) rotate(0deg);
}

.party-stage .character[data-character="snoopy"] {
  width: 11%;
  height: 29%;
}

.party-stage .character[data-character="woodstock"] {
  width: 6%;
  height: 11%;
}

.party-stage .character-name {
  position: absolute;
  left: 50%;
  bottom: -24px;
  z-index: 4;
  display: block;
  max-width: none;
  padding: 5px 8px;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 2px 2px 0 var(--ink);
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%) rotate(-1deg);
  transition: opacity 130ms ease;
}

.party-stage .character:hover .character-name,
.party-stage .character:focus-visible .character-name,
.party-stage .character.is-heard .character-name {
  opacity: 1;
}

.party-stage .cake-card {
  position: absolute;
  left: 50%;
  top: 65%;
  z-index: 5;
  display: block;
  width: 33%;
  height: 54%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.party-stage .cake-card:hover,
.party-stage .cake-card:focus-visible {
  box-shadow: none;
  transform: translate(-50%, -50%);
}

.cake-hotspot-ring {
  position: absolute;
  left: 50%;
  top: 25%;
  width: 58px;
  height: 58px;
  border: 2px dashed rgba(23, 21, 15, 0.64);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 150ms ease;
}

.cake-card:hover .cake-hotspot-ring,
.cake-card:focus-visible .cake-hotspot-ring {
  opacity: 1;
  animation: hotspot-pulse 1.3s ease-in-out infinite;
}

@keyframes hotspot-pulse {
  50% { transform: translate(-50%, -50%) scale(1.15); }
}

.party-stage .cake-copy {
  position: absolute;
  left: 50%;
  bottom: 4%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: max-content;
  padding: 8px 13px;
  border: 2px solid var(--ink);
  background: rgba(255, 253, 245, 0.94);
  box-shadow: 3px 4px 0 var(--ink);
  opacity: 0.94;
  text-align: center;
  transform: translateX(-50%) rotate(-1deg);
}

.party-stage .cake-copy b {
  font-size: 13px;
}

.party-stage .cake-copy small {
  font-size: 8px;
  font-weight: 700;
}

.party-stage .speech-pop {
  position: absolute;
  left: 50%;
  top: 3%;
  bottom: auto;
  z-index: 20;
}

@media (min-width: 1921px) {
  .party-stage {
    box-shadow: 0 0 80px rgba(199, 227, 239, 0.96);
  }
}

@media (max-width: 900px) {
  .party-intro {
    align-items: flex-start;
    padding-block: 18px;
  }

  .party-intro h1 {
    font-size: clamp(30px, 6vw, 48px);
  }

  .party-stage {
    min-height: 0;
    margin: 0 auto;
  }

  .party-stage::before {
    display: none;
  }

  .party-stage .character {
    width: 11%;
    min-width: 42px;
    min-height: 42px;
  }

  .party-stage .cake-card {
    width: 36%;
    height: 58%;
    transform: translate(-50%, -50%);
  }

  .party-stage .cake-card:hover {
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 620px) {
  .party-view {
    padding-inline: 0;
    padding-bottom: 38px;
  }

  .party-intro {
    flex-direction: column;
    gap: 14px;
    padding: 16px 14px;
  }

  .party-title-lockup {
    width: 100%;
  }

  .party-intro h1 {
    font-size: 34px;
  }

  .party-hint {
    font-size: 11px;
  }

  .party-quick-actions {
    width: 100%;
  }

  .party-intro .wish-counter,
  .party-intro .camera-ticket {
    flex: 1;
    min-width: 0;
  }

  .party-stage {
    min-height: 0;
    margin-inline: auto;
  }

  .party-stage .character {
    width: 12%;
    height: 28%;
  }

  .party-stage .character-name {
    bottom: -18px;
    padding: 3px 5px;
    font-size: 7px;
  }

  .party-stage .cake-card {
    top: 65%;
    width: 39%;
    height: 64%;
    transform: translate(-50%, -50%);
  }

  .party-stage .cake-card:hover {
    transform: translate(-50%, -50%);
  }

  .party-stage .cake-copy {
    bottom: -2px;
    padding: 4px 7px;
  }

  .party-stage .cake-copy b {
    font-size: 9px;
  }

  .party-stage .cake-copy small {
    display: none;
  }

  .party-stage .speech-pop {
    position: fixed;
    left: 14px;
    right: 14px;
    top: auto;
    bottom: 18px;
    width: auto;
    transform: none;
  }

  .party-stage .speech-pop::after {
    display: none;
  }
}

/* Homepage v2 cascade guard: keep the new minimal interactions above legacy demo rules. */
.party-view {
  display: grid;
  place-items: start center;
  min-height: calc(100svh - 68px);
  padding: 0;
}

.party-stage {
  max-width: 1920px;
}

.party-stage .character:hover,
.party-stage .character:focus-visible {
  border-color: transparent;
  background: transparent;
  transform: translate(-50%, -50%) scale(1.035);
}

.party-stage .cake-copy {
  bottom: 1%;
  display: flex;
  opacity: 0;
  transform: translateX(-50%) translateY(6px) rotate(-1deg);
  transition: opacity 140ms ease, transform 180ms ease;
}

.party-stage .cake-card:hover .cake-copy,
.party-stage .cake-card:focus-visible .cake-copy {
  opacity: 1;
  transform: translateX(-50%) translateY(0) rotate(-1deg);
}

@media (max-width: 700px) {
  .party-view {
    min-height: calc(100svh - 62px);
    padding: 0;
  }

  .party-stage .cake-copy {
    display: none;
  }
}

/* Camera framing v3 — preserve each frame's native ratio and isolate the live view. */
.camera-view .live-polaroid {
  width: min(100%, 450px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.camera-view .photo-stage,
.camera-view .captured-stage {
  --frame-ratio: 1 / 1;
  --view-left: 14%;
  --view-top: 14%;
  --view-width: 72%;
  --view-height: 68%;
  position: relative;
  width: 100%;
  aspect-ratio: var(--frame-ratio);
  overflow: hidden;
  background: #fff;
}

.camera-view .photo-viewport,
.camera-view .captured-viewport {
  position: absolute;
  left: var(--view-left);
  top: var(--view-top);
  z-index: 1;
  display: block;
  width: var(--view-width);
  height: var(--view-height);
  overflow: hidden;
  background: #fff;
}

.camera-view .photo-viewport video,
.camera-view .captured-viewport img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--photo-filter, none);
}

.camera-view .camera-placeholder {
  inset: 0;
  z-index: 2;
}

.camera-view .selected-frame,
.camera-view .captured-stage > img:last-child {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(var(--frame-scale, 1));
}

.camera-view .polaroid-caption,
.camera-view .captured-date {
  display: none;
}

.camera-view .frame-strip {
  align-items: start;
}

.camera-view .frame-option img {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  background: #fff;
}

.camera-view .flip-card {
  --frame-ratio: 1 / 1;
  aspect-ratio: var(--frame-ratio);
}

.camera-view .flip-front {
  padding: 0;
  border: 0;
  background: #fff;
  box-shadow: none;
}

.camera-view .flip-front .captured-stage {
  height: 100%;
}

.brand-icon {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

@media (max-width: 700px) {
  .brand-icon {
    width: 38px;
    height: 38px;
  }
}

/* Camera page v4 — quieter hierarchy, solid backdrop, unobstructed viewfinder. */
body.camera-active .paper-noise {
  display: none;
}

.camera-view {
  background: #c7e3ef;
  background-image: none;
}

.camera-view .camera-heading {
  max-width: 760px;
  margin-bottom: clamp(34px, 4vw, 52px);
}

.camera-view .back-to-party {
  margin-bottom: 24px;
  box-shadow: none;
  transform: none;
}

.camera-view .camera-heading h2 {
  font-size: clamp(40px, 4.2vw, 60px);
  line-height: 1;
  letter-spacing: -.045em;
}

.camera-view .camera-heading h2 em {
  text-decoration: none;
}

.camera-view .camera-heading > p:last-child {
  margin-top: 20px;
}

.camera-view .camera-placeholder {
  grid-template-rows: auto auto;
  background: repeating-linear-gradient(135deg, #8fc9e5 0 22px, #76b7d8 23px 44px);
}

.camera-view .placeholder-dog {
  display: none;
}

.camera-view .photo-stage {
  border: 3px solid #fff;
}

.camera-view .frame-option {
  display: flex;
  min-height: 205px;
  flex-direction: column;
}

.camera-view .frame-option img {
  width: 100%;
  height: 165px;
  flex: 0 0 165px;
  object-fit: contain;
}

.camera-view .frame-option span {
  margin-top: auto;
  padding-top: 8px;
}

@media (max-width: 620px) {
  .camera-view .camera-heading h2 {
    font-size: clamp(38px, 11vw, 48px);
  }
}

/* Candle ritual v2 — the illustrated cake is the interaction surface. */
.cake-modal {
  background:
    radial-gradient(circle at 50% 52%, rgba(35, 112, 170, .34), transparent 34%),
    linear-gradient(145deg, #09294a 0%, #061a33 52%, #041326 100%);
}

.cake-modal::before {
  background:
    radial-gradient(circle at 50% 52%, transparent 0 40%, rgba(1, 9, 22, .5) 88%),
    linear-gradient(rgba(255, 255, 255, .018), rgba(255, 255, 255, 0));
}

.cake-modal .modal-topbar {
  max-width: 1240px;
  border-bottom-color: rgba(160, 208, 238, .34);
}

.cake-modal .modal-topbar h2 {
  max-width: 780px;
  color: #fffdf4;
  font-size: clamp(30px, 4vw, 56px);
  line-height: .98;
}

.cake-modal .modal-kicker {
  color: #f6d642;
}

.cake-modal .modal-close {
  border-color: rgba(255, 255, 255, .45);
  background: rgba(2, 16, 35, .35);
}

.cake-modal .ritual-stage {
  min-height: calc(100svh - 122px);
  padding: 30px 0 54px;
}

.cake-modal .woodstock-flight {
  top: 7%;
  z-index: 8;
  gap: 0;
  pointer-events: none;
}

.cake-modal .woodstock-flight img {
  display: block;
  width: clamp(120px, 11vw, 185px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .22));
}

.cake-modal .woodstock-body,
.cake-modal .lighter-trail,
.cake-modal .lighter-icon {
  display: none;
}

@keyframes woodstock-delivery {
  0% { left: -16%; transform: translateY(-25px) rotate(-3deg); }
  66% { left: 54%; transform: translateY(18px) rotate(5deg); }
  100% { left: 76%; transform: translateY(0) rotate(-2deg); }
}

.cake-modal .lighter-pickup {
  top: 22%;
  right: 7%;
  min-width: 178px;
  justify-content: center;
  padding: 13px 18px;
  border: 2px solid #f8fbff;
  background: #f6d642;
  color: #071a31;
  box-shadow: 6px 6px 0 #2d8fca;
  letter-spacing: .08em;
}

.cake-modal .lighter-pickup > span {
  font-size: 18px;
}

.cake-modal .ritual-stage.has-lighter {
  cursor: default;
}

.cake-modal .ritual-cake {
  position: relative;
  width: min(620px, 78vw);
  height: auto;
  aspect-ratio: 1;
  margin: 8px 0 0;
}

.ritual-cake-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, .3));
  pointer-events: none;
}

.cake-flames {
  position: absolute;
  inset: 0;
  z-index: 5;
}

.cake-flame-button {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 46px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.cake-flame-button:disabled {
  cursor: default;
}

.ritual-stage.has-lighter .cake-flame-button:not(:disabled)::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(246, 214, 66, .86);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: wick-pulse 1.15s ease-in-out infinite;
}

@keyframes wick-pulse {
  50% { opacity: .28; transform: translate(-50%, -50%) scale(1.55); }
}

.cake-flame-button:focus-visible {
  outline: 2px solid #f6d642;
  outline-offset: 2px;
}

.cake-flame-button .flame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 29px;
  border-radius: 52% 48% 48% 52% / 66% 64% 36% 34%;
  background: radial-gradient(circle at 52% 70%, #fff8bd 0 18%, #ffd43b 20% 48%, #ff7b28 52% 100%);
  box-shadow: 0 0 10px #ff9d2e, 0 0 27px rgba(246, 214, 66, .88), 0 0 52px rgba(82, 169, 231, .35);
  opacity: 0;
  transform: translate(-50%, -96%) scale(.25);
  transform-origin: 50% 100%;
  transition: opacity .22s ease, transform .22s ease;
}

.cake-flame-button.is-lit .flame {
  opacity: 1;
  transform: translate(-50%, -96%) scale(1);
  animation: cake-flame-dance .58s ease-in-out infinite alternate;
}

.cake-flame-button.is-out .flame {
  opacity: 0;
  transform: translate(-30%, -145%) scale(.08);
}

@keyframes cake-flame-dance {
  to { transform: translate(-50%, -96%) scale(.84, 1.12) rotate(5deg); }
}

.cake-modal .ritual-frosting,
.cake-modal .ritual-cake-body,
.cake-modal .ritual-cake-plate,
.cake-modal .number-candles {
  display: none;
}

.cake-modal .ritual-instruction {
  width: min(620px, 84vw);
  max-width: none;
  margin-top: -6px;
  border-top-color: rgba(160, 208, 238, .34);
}

.cake-modal .ritual-instruction p {
  font-size: 14px;
  letter-spacing: .015em;
}

.cake-modal .blow-controls {
  width: min(620px, 84vw);
  margin-top: 20px;
}

.cake-modal .blow-button {
  border-color: #a8d5ed;
  background: #167bb6;
}

.cake-modal .tap-fallback {
  border-bottom: 0;
  color: rgba(255, 255, 255, .76);
  letter-spacing: .06em;
  text-decoration: none;
}

.cake-modal .wish-complete {
  background: rgba(4, 19, 38, .96);
}

.cake-modal .big-scribble {
  color: #f6d642;
  font-size: clamp(46px, 8vw, 112px);
  letter-spacing: -.055em;
  text-decoration: none !important;
  transform: none;
}

.cake-modal .big-scribble::before,
.cake-modal .big-scribble::after {
  display: none !important;
  content: none !important;
}

.cake-modal .wish-complete h3 {
  max-width: 680px;
  text-decoration: none !important;
}

@media (max-width: 700px) {
  .cake-modal {
    padding-inline: 14px;
  }

  .cake-modal .modal-topbar h2 {
    font-size: clamp(27px, 9vw, 39px);
  }

  .cake-modal .ritual-stage {
    padding-top: 86px;
  }

  .cake-modal .ritual-cake {
    width: min(590px, 100vw);
    margin-top: 22px;
    transform: none;
  }

  .cake-modal .woodstock-flight {
    top: 4%;
  }

  .cake-modal .woodstock-flight img {
    width: 105px;
  }

  .cake-modal .lighter-pickup {
    top: 15%;
    right: 2%;
    min-width: 142px;
    max-width: none;
    font-size: 9px;
  }

  .cake-modal .ritual-instruction {
    margin-top: -16px;
  }

  .cake-flame-button {
    width: 40px;
    height: 50px;
  }
}
