*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --espresso: #24150f;
  --dark-roast: #3a241a;
  --walnut: #60412e;
  --ink: #5d3a25;
  --ink-soft: rgba(93, 58, 37, 0.72);
  --oat-cream: #fff8ed;
  --paper: #f8f2e6;
  --paper-shadow: rgba(25, 15, 10, 0.26);
  --amber-lamp: #f3b661;
  --chai-foam: #f2e4cf;
  --text-primary: #4d2f1f;
  --text-secondary: rgba(77, 47, 31, 0.72);
  --line-soft: rgba(93, 58, 37, 0.18);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 24px;
  --radius-sm: 12px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-body);
  background: var(--espresso);
  color: var(--text-primary);
}

.page-background {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.page-background-image,
.page-background-overlay {
  position: absolute;
  inset: 0;
}

.page-background-image {
  background:
    linear-gradient(rgba(18, 10, 7, 0.16), rgba(18, 10, 7, 0.18)),
    url('../assets/source.webp') center 30% / cover no-repeat;
  filter: saturate(0.86) brightness(0.78) sepia(0.08);
  transform: scale(1.04);
}

.page-background-overlay {
  background:
    radial-gradient(circle at 50% 16%, rgba(243, 182, 97, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(16, 8, 6, 0.22) 0%, rgba(16, 8, 6, 0.06) 28%, rgba(16, 8, 6, 0.28) 100%);
  backdrop-filter: blur(1px);
}

.ambient-player {
  position: fixed;
  top: clamp(14px, 2vw, 22px);
  right: clamp(14px, 2.4vw, 28px);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px 4px 4px 2px;
  border-radius: 999px;
  background: rgba(36, 21, 15, 0.5);
  box-shadow: 0 6px 24px rgba(18, 10, 7, 0.35), inset 0 0 0 1px rgba(255, 248, 237, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 248, 237, 0.2);
  transition: box-shadow 0.3s;
}

.ambient-player:hover {
  box-shadow: 0 8px 32px rgba(18, 10, 7, 0.45), 0 0 20px rgba(243, 182, 97, 0.15), inset 0 0 0 1px rgba(255, 248, 237, 0.2);
}

.ambient-player-artwork {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 248, 237, 0.2);
  box-shadow: 0 0 0 1.5px rgba(36, 21, 15, 0.3);
}

.ambient-player-body {
  display: flex;
  flex-direction: column;
  margin: 0 10px;
  min-width: 0;
  max-width: 95px;
  line-height: 1.3;
}

.ambient-player-title {
  font-size: 0.8rem;
  color: #fff8ed;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

.ambient-player-title::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6fcf97;
  margin-right: 6px;
  position: relative;
  top: -1px;
  animation: ambientPulse 1.6s ease-in-out infinite;
}

@keyframes ambientPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; box-shadow: 0 0 6px #6fcf97; }
}

.ambient-player-artist {
  font-size: 0.6rem;
  color: rgba(255, 248, 237, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.ambient-play-btn,
.ambient-prev-btn,
.ambient-next-btn {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ambient-play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #3a241a;
  background: rgba(255, 248, 237, 0.92);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.ambient-play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 14px rgba(0,0,0,0.18);
  background: rgba(255, 248, 237, 1);
}

.ambient-play-btn:active {
  transform: scale(0.96);
}

.ambient-play-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.ambient-prev-btn,
.ambient-next-btn {
  width: 24px;
  height: 24px;
  color: rgba(255, 248, 237, 0.7);
  transition: color 0.2s, transform 0.15s, background 0.2s;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.ambient-prev-btn { margin-right: 1px; }
.ambient-next-btn { margin-left: 1px; }

.ambient-prev-btn:hover,
.ambient-next-btn:hover {
  color: #fff8ed;
  background: rgba(255, 248, 237, 0.12);
  transform: scale(1.12);
}

.ambient-prev-btn svg,
.ambient-next-btn svg {
  width: 14px;
  height: 14px;
  display: block;
  transition: transform 0.15s;
}

.ambient-prev-btn:hover svg,
.ambient-next-btn:hover svg {
  transform: scale(1.08);
}

.poster-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.poster-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 48px);
}

.poster-figure {
  position: relative;
  width: min(82vw, 760px);
  aspect-ratio: 880 / 1260;
  filter: drop-shadow(0 28px 40px rgba(15, 8, 6, 0.32)) drop-shadow(0 8px 18px rgba(15, 8, 6, 0.22));
  overflow: visible;
}

.poster-art {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  pointer-events: none;
  transform-origin: 50% 12%;
  animation: posterFloat 9s ease-in-out infinite;
}

.poster-surprise-note {
  display: none;
  position: absolute;
  right: -142px;
  top: 51%;
  width: 286px;
  z-index: 20;
  opacity: 0;
  transform: translateY(-50%) translateX(10px) rotate(1.2deg);
  padding: 1.05rem 1rem 1rem;
  border: 1px solid rgba(93, 58, 37, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(248, 236, 218, 0.92));
  box-shadow:
    0 18px 34px rgba(31, 18, 11, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: var(--text-primary);
  text-align: left;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.poster-surprise-note::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(93, 58, 37, 0.08);
  border-radius: 13px;
  pointer-events: none;
}

.poster-surprise-note::after {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  width: 18px;
  height: 18px;
  background: rgba(255, 252, 246, 0.96);
  border-left: 1px solid rgba(93, 58, 37, 0.14);
  border-bottom: 1px solid rgba(93, 58, 37, 0.14);
  transform: translateY(-50%) rotate(45deg);
}

.poster-surprise-kicker {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.38rem;
  letter-spacing: 0.005em;
}

.poster-surprise-text {
  font-size: 0.82rem;
  line-height: 1.48;
  color: rgba(77, 47, 31, 0.76);
  margin: 0;
}

.poster-surprise-note-line {
  margin: 0.42rem 0 0;
  font-size: 0.69rem;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(77, 47, 31, 0.56);
}

@media (min-width: 900px) {
  .poster-figure:has(#teaSpillToggle:checked) .poster-surprise-note {
    display: block;
    opacity: 1;
    transform: translateY(-50%) translateX(0) rotate(1.2deg);
  }
}

@media (min-width: 1200px) {
  .poster-surprise-note {
    right: -150px;
    width: 300px;
  }
}

.poster-content {
  position: absolute;
  inset: 11% 10.5% 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.poster-figure:has(#teaSpillToggle:checked) .poster-content {
  inset: 9.1% 9.9% 5.8%;
}

.poster-hero-group,
.poster-timing-group,
.poster-action-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.poster-hero-group {
  gap: clamp(0.45rem, 0.9vw, 0.78rem);
}

.poster-timing-group {
  gap: clamp(0.65rem, 1.3vw, 1.1rem);
  margin-top: clamp(1.25rem, 3vw, 2rem);
}

.poster-figure:has(#teaSpillToggle:checked) .poster-timing-group {
  gap: clamp(0.42rem, 0.82vw, 0.74rem);
  margin-top: clamp(0.58rem, 1.55vw, 0.95rem);
}

.poster-action-group {
  gap: clamp(0.55rem, 0.9vw, 0.78rem);
  margin-top: clamp(1.15rem, 2.6vw, 1.75rem);
}

.poster-figure:has(#teaSpillToggle:checked) .poster-action-group {
  margin-top: clamp(0.62rem, 1.25vw, 0.88rem);
}

.poster-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.25rem 1rem;
  border: 1.8px solid rgba(93, 58, 37, 0.45);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.5);
  color: var(--ink);
  font-size: clamp(0.68rem, 0.95vw, 0.9rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.poster-brand {
  max-width: none;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.8vw, 4.25rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-wrap: nowrap;
}

.poster-subtitle {
  max-width: 40ch;
  margin-top: clamp(0.5rem, 0.9vw, 0.85rem);
  font-size: clamp(0.98rem, 1.32vw, 1.22rem);
  line-height: 1.55;
  color: var(--text-secondary);
  font-style: italic;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.poster-lead {
  max-width: 34ch;
  font-size: clamp(0.9rem, 1.15vw, 1.08rem);
  line-height: 1.58;
  color: var(--text-secondary);
  text-wrap: balance;
}

.poster-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.55rem, 1.15vw, 1rem);
}

.poster-cd-item {
  min-width: clamp(54px, 7.2vw, 82px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.poster-cd-value {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.poster-cd-label {
  margin-top: 0.4rem;
  font-size: clamp(0.58rem, 0.72vw, 0.72rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  font-weight: 700;
}

.poster-now-open {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.poster-countdown.open .poster-cd-item {
  display: none;
}

.poster-countdown.open .poster-now-open {
  display: flex;
}

.poster-now-open-label {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  color: var(--ink);
}

.poster-now-open-sub {
  font-size: clamp(0.68rem, 0.84vw, 0.84rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.poster-date {
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  color: var(--text-secondary);
}

.poster-date strong {
  color: var(--ink);
  font-weight: 800;
}

.poster-form-wrap {
  width: 100%;
  max-width: 446px;
  padding: clamp(0.88rem, 1.2vw, 1.08rem);
  border: 1px solid rgba(93, 58, 37, 0.2);
  border-radius: 20px;
  background: rgba(255, 250, 242, 0.44);
  box-shadow: 0 14px 34px rgba(36, 21, 15, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(3px);
}

.poster-figure:has(#teaSpillToggle:checked) .poster-form-wrap {
  padding: 0.66rem 0.94rem 0.8rem;
}

.poster-form-label {
  display: block;
  margin-bottom: 0.62rem;
  font-size: clamp(0.72rem, 0.88vw, 0.84rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  font-weight: 700;
}

.poster-form {
  width: 100%;
}

.poster-form-grid {
  display: grid;
  gap: 0.56rem;
}

.poster-optional-toggle {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 18px auto;
  align-items: center;
  justify-content: start;
  column-gap: 0.55rem;
  width: 100%;
  min-height: 44px;
  padding: 0.68rem 0.82rem;
  border: 1px solid rgba(93, 58, 37, 0.16);
  border-radius: 16px;
  background: rgba(255, 252, 246, 0.5);
  color: var(--ink-soft);
  font-size: clamp(0.72rem, 0.82vw, 0.82rem);
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.16s ease;
}

.poster-optional-toggle:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(93, 58, 37, 0.24);
  transform: translateY(-1px);
}

.poster-optional-toggle-text {
  display: block;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.35;
}

.poster-optional-toggle-input,
.poster-consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  border: 1.5px solid rgba(93, 58, 37, 0.3);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.62);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  align-self: center;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.poster-optional-toggle-input:checked,
.poster-consent input[type="checkbox"]:checked {
  background: var(--ink);
  border-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff8ed' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: 0 0 0 3px rgba(93, 58, 37, 0.08);
}

.poster-optional-toggle-input:focus-visible,
.poster-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(93, 58, 37, 0.4);
  outline-offset: 2px;
}

.poster-mobile-surprise-note {
  display: none;
}

.poster-form-optional {
  display: none;
  gap: 0.4rem;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transform: translateY(-4px);
  padding: 0 0.85rem;
  border: 1px dashed transparent;
  border-radius: 16px;
  background: transparent;
  margin-block: -0.56rem;
  pointer-events: none;
  transition: max-height 0.28s ease, opacity 0.2s ease, transform 0.2s ease, padding 0.2s ease, border-color 0.2s ease, background 0.2s ease, margin-top 0.2s ease, visibility 0s linear 0.28s;
}

label.poster-optional-toggle:has(#teaSpillToggle:checked) ~ .poster-form-optional {
  display: grid;
  max-height: 430px;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  padding: 0.68rem;
  border-color: rgba(93, 58, 37, 0.16);
  background: rgba(255, 250, 242, 0.34);
  margin: 0.04rem 0 0;
  pointer-events: auto;
}

.poster-form-optional-note {
  font-size: clamp(0.67rem, 0.72vw, 0.74rem);
  line-height: 1.38;
  color: rgba(77, 47, 31, 0.62);
}

.poster-form-optional-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.46rem;
}

.poster-span-2 {
  grid-column: 1 / -1;
}

.poster-input,
.poster-select,
.poster-textarea,
.poster-btn {
  min-height: 48px;
  width: 100%;
  border-radius: 14px;
  font-family: var(--font-body);
}

.poster-input,
.poster-select,
.poster-textarea {
  border: 1.5px solid rgba(93, 58, 37, 0.18);
  background: rgba(255, 255, 255, 0.58);
  color: var(--text-primary);
  padding: 0.85rem 1rem;
  font-size: clamp(0.95rem, 1vw, 1rem);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.poster-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(77, 47, 31, 0.55) 50%),
    linear-gradient(135deg, rgba(77, 47, 31, 0.55) 50%, transparent 50%);
  background-position:
    calc(100% - 1.05rem) calc(50% - 2px),
    calc(100% - 0.8rem) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.35rem;
}

.poster-textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.45;
}

.poster-figure:has(#teaSpillToggle:checked) .poster-textarea {
  min-height: 68px;
}

.poster-input::placeholder,
.poster-textarea::placeholder {
  color: rgba(77, 47, 31, 0.42);
}

.poster-input:focus,
.poster-select:focus,
.poster-textarea:focus {
  border-color: rgba(93, 58, 37, 0.42);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(93, 58, 37, 0.08);
}

.poster-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.25rem;
  line-height: 1.2;
  border: none;
  background: var(--ink);
  color: var(--oat-cream);
  cursor: pointer;
  font-size: clamp(0.92rem, 1vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.16s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.poster-btn-primary {
  font-weight: 700;
}

.poster-btn-secondary {
  font-size: 0.7em;
  font-weight: 400;
  opacity: 0.8;
}

.poster-figure:has(#teaSpillToggle:checked) .poster-date {
  font-size: 0.92em;
}

.poster-figure:has(#teaSpillToggle:checked) .poster-brand {
  font-size: clamp(2rem, 5vw, 2.8rem);
}

.poster-figure:has(#teaSpillToggle:checked) .poster-subtitle {
  max-width: 30ch;
}

.poster-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(93, 58, 37, 0.18);
}

.poster-btn:active {
  transform: translateY(0);
}

.poster-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.poster-btn.loading {
  position: relative;
  overflow: hidden;
}

.poster-btn.loading span,
.poster-btn.loading svg {
  opacity: 0.32;
}

.poster-btn.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 1.2s ease-in-out infinite;
}

.poster-consent {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  justify-content: start;
  column-gap: 0.55rem;
  font-size: clamp(0.7rem, 0.78vw, 0.8rem);
  color: rgba(77, 47, 31, 0.58);
  line-height: 1.35;
  width: 100%;
  margin: 0;
  padding: 0.68rem 0.82rem;
  border: 1px solid rgba(93, 58, 37, 0.14);
  border-radius: 16px;
  background: rgba(255, 252, 246, 0.4);
  text-align: left;
  cursor: pointer;
}

.poster-consent-copy {
  display: block;
  text-align: left;
  min-width: 0;
  color: rgba(77, 47, 31, 0.74);
}

.poster-consent a {
  color: rgba(93, 58, 37, 0.72);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.poster-consent a:hover {
  color: var(--ink);
}

/* Character counter styles */
.char-counter {
  display: none;
}

.char-counter.warning {
  display: none;
}

.poster-input.near-limit {
  border-color: #f59e0b;
}

.poster-input.invalid {
  border-color: #ef4444;
}

.poster-input.invalid:focus {
  outline-color: #ef4444;
}

.poster-form-message {
  min-height: 1.25em;
  margin-top: 0.6rem;
  font-size: clamp(0.74rem, 0.88vw, 0.86rem);
  color: var(--ink-soft);
}

.poster-form-message.success {
  color: #2f6f44;
}

.poster-form-message.error {
  color: #8a2e24;
}

.poster-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}

.poster-social-link {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--ink);
  border: 1px solid rgba(93, 58, 37, 0.16);
  background: rgba(255, 251, 245, 0.36);
  transition: transform 0.16s ease, background 0.2s ease, border-color 0.2s ease;
}

.poster-social-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(93, 58, 37, 0.34);
}

.poster-signoff {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.32rem;
  margin-top: clamp(0.6rem, 1vw, 0.9rem);
}

.poster-location {
  font-size: clamp(0.96rem, 1vw, 1.04rem);
  color: rgba(252, 244, 230, 0.82);
  font-style: italic;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.32);
}

/* ── Celebration (inline success state) ── */

/* Hide celebration by default, show form */
.celebration-overlay {
  display: none;
}

/* Show celebration, hide form when form-success is active */
.form-success form {
  display: none;
}

.form-success .celebration-overlay {
  display: block;
  animation: celebrationFadeIn 0.4s ease both;
}

@keyframes celebrationFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: var(--radius);
}

.celebration-card {
  position: relative;
  z-index: 2;
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 1.8rem 1.5rem;
  text-align: center;
  max-width: 280px;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 8px 32px var(--paper-shadow);
  animation: celebrationCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.15s;
}

@keyframes celebrationCardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.celebration-checkmark {
  margin-bottom: 0.8rem;
  animation: celebrationCheckBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.3s;
}

@keyframes celebrationCheckBounce {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.celebration-checkmark svg {
  display: block;
  margin: 0 auto;
}

.celebration-checkmark circle {
  stroke-dasharray: 140;
  stroke-dashoffset: 140;
  animation: celebrationCircleDraw 0.6s ease forwards;
  animation-delay: 0.4s;
}

@keyframes celebrationCircleDraw {
  to { stroke-dashoffset: 0; }
}

.celebration-checkmark path {
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: celebrationCheckDraw 0.4s ease forwards;
  animation-delay: 0.8s;
}

@keyframes celebrationCheckDraw {
  to { stroke-dashoffset: 0; }
}

.celebration-heading {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--espresso);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.celebration-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.celebration-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.celebration-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem !important;
  font-size: 0.78rem !important;
  text-decoration: none;
}

.celebration-close-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.celebration-close-btn:hover {
  background: rgba(93, 58, 37, 0.1);
  color: var(--ink);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: var(--oat-cream);
  background: var(--espresso);
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 0;
}

:focus-visible {
  outline: 2px solid rgba(93, 58, 37, 0.5);
  outline-offset: 3px;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes posterFloat {
  0%, 100% {
    transform: translateY(0) rotate(-0.6deg);
  }
  50% {
    transform: translateY(-10px) rotate(0.6deg);
  }
}

@media (max-width: 900px) {
  .poster-figure {
    width: min(92vw, 680px);
  }

  .poster-content {
    inset: 11.5% 9.5% 7.5%;
  }

  /* FIX: Keep player at top on tablets */
  .ambient-player {
    top: 14px;
    right: 14px;
    bottom: auto;
    transform: none;
  }

  /* FIX: Increase social icon size for tablets */
  .poster-social-link {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 768px) {
  /* ── Switch to simple page layout on mobile/tablet ── */
  
  .poster-stage {
    padding: 0;
    min-height: auto;
  }

  /* Hide the poster SVG art — it's a desktop-only shape */
  .poster-art {
    display: none;
  }

  /* Poster becomes a simple card — no shape, no shadow */
  .poster-figure {
    width: 100%;
    max-width: 100%;
    aspect-ratio: auto;
    min-height: auto;
    filter: none;
    background: rgba(255, 248, 237, 0.92);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  /* Embed player at bottom of page instead of fixed */
  .ambient-player {
    position: static;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    border-radius: 12px;
    padding: 8px 12px;
    justify-content: center;
    top: auto;
    right: auto;
    transform: none;
  }

  /* Content flows naturally inside the card */
  .poster-content {
    position: relative;
    inset: auto;
    padding: 2rem 1.5rem;
    gap: 0.9rem;
    max-width: 440px;
    width: 100%;
  }

  .poster-figure:has(#teaSpillToggle:checked) .poster-content {
    inset: auto;
  }

  .ambient-player-body {
    max-width: 100px;
  }

  .poster-form-wrap {
    padding: 1rem;
  }

  .poster-mobile-surprise-note {
    grid-column: 1 / -1;
    display: none;
    gap: 0.18rem;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    margin-block: -0.62rem;
    padding: 0 0.82rem;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: rgba(77, 47, 31, 0.68);
    text-align: left;
    transform: translateY(-4px);
    transition: max-height 0.24s ease, opacity 0.2s ease, transform 0.2s ease, padding 0.2s ease, margin 0.2s ease, visibility 0s linear 0.24s;
  }

  .poster-mobile-surprise-note strong {
    font-family: var(--font-display);
    font-size: 0.92rem;
    line-height: 1.2;
    color: var(--ink);
  }

  .poster-mobile-surprise-note span {
    font-size: 0.74rem;
    line-height: 1.38;
  }

  label.poster-optional-toggle:has(#teaSpillToggle:checked) + .poster-mobile-surprise-note {
    display: grid;
    max-height: 96px;
    opacity: 1;
    visibility: visible;
    margin: 0.02rem 0 0;
    padding: 0.56rem 0.82rem 0.6rem;
    border-color: rgba(93, 58, 37, 0.12);
    background: rgba(255, 252, 246, 0.36);
    transform: translateY(0);
  }

  .poster-form-optional-grid {
    grid-template-columns: 1fr;
  }

  .poster-span-2 {
    grid-column: auto;
  }

  label.poster-optional-toggle:has(#teaSpillToggle:checked) ~ .poster-form-optional {
    max-height: 520px;
  }

  .poster-social-link {
    width: 48px;
    height: 48px;
  }

  .poster-cd-item {
    min-width: 48px;
  }

  .poster-cd-value {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .poster-cd-label {
    font-size: 0.6rem;
  }

  .poster-countdown {
    gap: 0.4rem;
  }

  .poster-form-grid {
    gap: 0.56rem;
  }

  .poster-btn {
    padding: 0.7rem 1rem;
    font-size: 0.82rem;
  }

  /* Tighter padding on very small screens */
  @media (max-width: 400px) {
    .poster-content {
      padding: 1.2rem 0.9rem;
    }
    .poster-form-wrap {
      padding: 0.7rem;
    }
  }
}

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