@property --champagne-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  --bg-midnight: #08090d;
  --gold-champagne: #d4af37;
  --charcoal-card: #181b22;
  --brass-bronze: #8c6d3b;
  --amber-sparkle: #ffe082;
  --text-starlight: #f7f4ea;
  --text-muted: #9ba0aa;
  --border-gold: rgba(212, 175, 55, 0.35);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --font-display: "Bodoni Moda", serif;
  --font-body: "Anuphan", sans-serif;
  --ease-lux: cubic-bezier(.22, 1, .36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  background-color: #030406;
}

body {
  font-family: var(--font-body);
  background-color: #030406;
  color: var(--text-starlight);
  line-height: 1.65;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Mobile Frame Container */
.app-viewport {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background-color: var(--bg-midnight);
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
}

/* Confetti Canvas (T66) */
canvas.confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1500;
}

/* Floating Controls (Top Nav) */
.top-nav {
  position: fixed;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 1000;
}

.nav-btn {
  background: rgba(24, 27, 34, 0.88);
  color: var(--gold-champagne);
  border: 1px solid var(--border-gold);
  padding: 7px 13px;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.nav-btn:hover {
  transform: scale(1.05);
  border-color: var(--amber-sparkle);
}

/* Bilingual text toggle */
[data-l] {
  display: inline;
}

html[lang="th"] [data-l="en"] {
  display: none !important;
}

html[lang="en"] [data-l="th"] {
  display: none !important;
}

/* Hero Section (100dvh Lock Screen) with Animated Gradient Aura (T23) */
.hero-section {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 50px 20px 48px;
  text-align: center;
  position: relative;
  box-sizing: border-box;
  background: radial-gradient(circle at 50% 25%, rgba(212, 175, 55, 0.16) 0%, rgba(8, 9, 13, 0.98) 75%);
}

.hero-aura {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.22) 0%, rgba(255, 224, 130, 0.08) 50%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  animation: auraPulse 6s ease-in-out infinite alternate;
}

@keyframes auraPulse {
  0% { transform: translateX(-50%) scale(0.9); opacity: 0.6; }
  100% { transform: translateX(-50%) scale(1.15); opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.badge-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(140, 109, 59, 0.3) 100%);
  color: var(--amber-sparkle);
  border: 1px solid var(--border-gold);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  font-weight: 500;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #ffffff 20%, var(--gold-champagne) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 32ch;
  margin-inline: auto;
  text-wrap: balance;
  line-height: 1.6;
  margin-bottom: 22px;
}

.hero-subtitle .phrase {
  display: inline-block;
}

/* Die-Cut VIP Golden Pass (Opening Gimmick) */
.ticket-stage {
  perspective: 1000px;
  margin: 10px auto 20px;
  width: 300px;
  cursor: pointer;
  position: relative;
  z-index: 5;
}

.vip-ticket {
  background: linear-gradient(135deg, #232733 0%, #14171f 100%);
  border: 1.5px solid var(--gold-champagne);
  border-radius: 16px;
  padding: 20px 20px 16px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7), 0 0 25px rgba(212, 175, 55, 0.2);
  position: relative;
  overflow: hidden;
  transition: transform 0.5s var(--ease-lux), box-shadow 0.5s var(--ease-lux);
}

.vip-ticket:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.8), 0 0 35px rgba(212, 175, 55, 0.3);
}

/* Die-Cut Ticket Side Punched Notches (12px Notches) */
.ticket-notch {
  position: absolute;
  top: 72px;
  width: 24px;
  height: 24px;
  background: #08090d;
  border-radius: 50%;
  z-index: 10;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.8);
}

.ticket-notch.notch-left {
  left: -12px;
  border-right: 1.5px solid var(--gold-champagne);
}

.ticket-notch.notch-right {
  right: -12px;
  border-left: 1.5px solid var(--gold-champagne);
}

/* Ticket Header */
.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--border-gold);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.ticket-badge {
  font-size: 10px;
  color: var(--gold-champagne);
  letter-spacing: 0.14em;
  font-weight: 600;
  text-transform: uppercase;
}

.ticket-year {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--amber-sparkle);
}

.ticket-body {
  text-align: left;
}

.ticket-guest-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ticket-guest-name {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
}

.ticket-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--gold-champagne);
  letter-spacing: 0.05em;
}

/* Die-Cut Perforation Line */
.ticket-perforation {
  margin: 12px -20px 10px;
  border-bottom: 1.5px dashed rgba(212, 175, 55, 0.45);
}

/* Gold Foil Barcode Strip */
.ticket-barcode-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding-top: 4px;
}

.gold-barcode-bars {
  width: 100%;
  height: 28px;
  background: repeating-linear-gradient(
    90deg,
    #d4af37 0px,
    #d4af37 2.5px,
    transparent 2.5px,
    transparent 5px,
    #ffe082 5px,
    #ffe082 9px,
    transparent 9px,
    transparent 11px,
    #d4af37 11px,
    #d4af37 13px,
    transparent 13px,
    transparent 16px,
    #ffe082 16px,
    #ffe082 20px,
    transparent 20px,
    transparent 22px,
    #d4af37 22px,
    #d4af37 27px,
    transparent 27px,
    transparent 30px
  );
  border-radius: 2px;
  opacity: 0.92;
}

.barcode-serial {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--amber-sparkle);
  font-weight: 600;
  opacity: 0.9;
}

.ticket-hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--gold-champagne);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(24, 27, 34, 0.92);
  border: 1px solid var(--border-gold);
  border-radius: 99px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.ticket-hint:hover {
  background: rgba(212, 175, 55, 0.2);
  transform: translateY(-2px);
}

/* Revealed Content */
.invitation-body {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-lux), max-height 1s var(--ease-lux), transform 0.8s var(--ease-lux);
}

.invitation-body.revealed {
  opacity: 1;
  max-height: 5000px;
  transform: translateY(0);
}

.content-wrapper {
  padding: 16px 18px 50px;
}

.card-block {
  background: var(--charcoal-card);
  border-radius: 18px;
  padding: 24px 20px;
  margin-bottom: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  position: relative;
}

.block-header {
  text-align: center;
  margin-bottom: 18px;
}

.block-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 4px;
}

.block-desc {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 300;
}

/* Countdown Card (T36 & T60) */
.countdown-box {
  background: radial-gradient(circle at 50% 0%, #20242e 0%, var(--charcoal-card) 100%);
  border-radius: 18px;
  padding: 24px 18px 22px;
  margin-bottom: 22px;
  text-align: center;
  border: 1px solid var(--border-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.countdown-title {
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--text-starlight);
  margin-bottom: 16px;
  font-weight: 400;
  max-width: 230px;
  margin-inline: auto;
  text-wrap: balance;
  line-height: 1.45;
}

.tz-pill {
  font-size: 11px;
  color: var(--gold-champagne);
  letter-spacing: 0.08em;
  font-weight: 500;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.odometer-card {
  background: rgba(8, 9, 13, 0.7);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 10px 8px;
  min-width: 64px;
}

.odometer {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--amber-sparkle);
  line-height: 1.1;
}

.count-lbl {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Bento Grid Highlights (T44) */
.bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.bento-item {
  background: var(--charcoal-card);
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.bento-item.full-span {
  grid-column: span 2;
}

.bento-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.bento-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.bento-text {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.gold-text {
  color: var(--amber-sparkle);
  font-weight: 600;
}

.palette-swatches {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Schedule Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 12px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 36px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: rgba(212, 175, 55, 0.2);
}

.time-item {
  display: flex;
  gap: 14px;
  position: relative;
}

.time-stamp {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--amber-sparkle);
  background: #222630;
  padding: 4px 8px;
  border-radius: 6px;
  height: fit-content;
  white-space: nowrap;
  border: 1px solid var(--border-gold);
  z-index: 1;
}

.time-name {
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
  margin-bottom: 2px;
}

.time-detail {
  font-size: 12px;
  color: var(--text-muted);
}

/* Venue Section */
.venue-box {
  background: #11141b;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  border-left: 4px solid var(--gold-champagne);
}

.venue-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--amber-sparkle);
  margin-bottom: 4px;
}

.venue-address {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.venue-note {
  font-size: 11px;
  color: var(--gold-champagne);
}

.map-action-wrap {
  margin-top: 10px;
}

.map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(140, 109, 59, 0.3) 100%);
  color: var(--amber-sparkle);
  border: 1px solid var(--border-gold);
  text-decoration: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s, background-color 0.2s;
}

.map-btn:hover {
  transform: translateY(-1px);
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--amber-sparkle);
}

/* RSVP Form & Attend / Decline Toggle */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--gold-champagne);
  margin-bottom: 6px;
}

/* Segmented Attend / Decline Selector */
.attendance-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.attend-btn {
  background: #11141b;
  border: 1.5px solid var(--border-gold);
  color: var(--text-muted);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.attend-btn:hover {
  border-color: var(--amber-sparkle);
  background: #1a1e27;
}

.attend-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.3) 0%, rgba(140, 109, 59, 0.4) 100%);
  color: var(--amber-sparkle);
  border-color: var(--amber-sparkle);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.attend-btn.active .attend-icon {
  transform: scale(1.1);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  background: #0f1117;
  color: var(--text-starlight);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--gold-champagne);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 70px;
}

.char-counter {
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

.consent-row input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--gold-champagne);
}

.privacy-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 11.5px;
  font-family: var(--font-body);
  color: var(--gold-champagne);
  text-decoration: underline;
  cursor: pointer;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #d4af37 0%, #aa8420 100%);
  color: #08090d;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
}

.submit-status {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  display: none;
}

.submit-status.error {
  display: block;
  background: rgba(155, 28, 28, 0.3);
  color: #f8b4b4;
  border: 1px solid #f8b4b4;
}

.submit-status.success {
  display: block;
  background: rgba(3, 84, 63, 0.3);
  color: #bcf0da;
  border: 1px solid #bcf0da;
}

/* VIP RSVP Success Card (Post-submit state) */
.rsvp-success-card {
  background: #11141b;
  border: 1.5px solid var(--gold-champagne);
  border-radius: 16px;
  padding: 24px 18px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.2);
  animation: fadeInSuccess 0.4s ease;
}

@keyframes fadeInSuccess {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.success-icon {
  font-size: 38px;
  margin-bottom: 8px;
}

.success-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--amber-sparkle);
  margin-bottom: 6px;
}

.success-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 34ch;
  margin: 0 auto;
}

.success-badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.15);
  color: var(--amber-sparkle);
  border: 1px solid var(--border-gold);
  padding: 6px 14px;
  border-radius: 99px;
  font-weight: 500;
  font-size: 12.5px;
  margin: 14px 0 16px;
}

.edit-rsvp-btn {
  background: transparent;
  border: 1px solid var(--border-gold);
  color: var(--gold-champagne);
  padding: 8px 18px;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.edit-rsvp-btn:hover {
  background: var(--gold-champagne);
  color: #08090d;
}

/* Privacy Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--charcoal-card);
  border: 1px solid var(--border-gold);
  max-width: 380px;
  width: 100%;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  font-size: 13px;
  color: var(--text-starlight);
  position: relative;
}

.modal-close {
  margin-top: 16px;
  width: 100%;
  padding: 9px;
  background: var(--gold-champagne);
  color: #08090d;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
}

/* Footer & Creator Pill (Playbook rule 2.1) */
.footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 20px 10px 40px;
}

.credit-wrap {
  margin-top: 18px;
  text-align: center;
}

.site-credit {
  position: static;
  display: inline-block;
  margin: 0 auto;
  font: 500 11px/1.2 system-ui, "Noto Sans Thai", sans-serif;
  letter-spacing: .02em;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(24, 27, 34, 0.85);
  color: var(--amber-sparkle);
  border: 1px solid var(--border-gold);
  text-decoration: none;
  opacity: .85;
  transition: opacity .2s, border-color .2s;
}

.site-credit:hover {
  opacity: 1;
  border-color: var(--amber-sparkle);
}

@media print {
  .site-credit, .top-nav {
    display: none;
  }
}
