@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600;1,700&display=swap');

:root {
  color-scheme: light;
  --paper: #fff8f3;
  --ink: #332729;
  --muted: #887876;
  --rose: #e95672;
  --rose-dark: #ce3957;
  --rose-pale: #fff0f1;
  --peach: #f6c593;
  --line: #f0dfda;
  --mono: 'DM Mono', 'Courier New', monospace;
  --sans: 'DM Sans', Arial, sans-serif;
  --serif: 'Playfair Display', Georgia, serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--paper); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(ellipse at 9% 17%, rgba(247, 203, 183, .24) 0 1px, transparent 2px),
    radial-gradient(ellipse at 91% 75%, rgba(220, 134, 153, .18) 0 1px, transparent 2px),
    var(--paper);
  background-size: 22px 24px, 28px 28px, auto;
}

button, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

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

.page-wrap { width: min(100% - 38px, 665px); margin: 0 auto; padding: 32px 0 28px; }
.topline, .page-footer { display: flex; align-items: center; justify-content: center; gap: 10px; color: #a28885; font: 10px var(--mono); letter-spacing: .1em; }
.topline { position: relative; margin: 0 auto 18px; }
.tiny-heart { color: var(--rose); font-size: 13px; }
.stamp { position: absolute; right: 0; border: 1px solid #efd7d7; border-radius: 100px; padding: 5px 8px; font-size: 8px; transform: rotate(4deg); }
.floating-sticker { position: fixed; z-index: 0; color: #e8a5a7; user-select: none; }
.sticker-star { top: 19%; left: calc(50% - 440px); font-size: 33px; transform: rotate(-17deg); }
.sticker-heart { right: calc(50% - 430px); bottom: 24%; font-size: 45px; transform: rotate(14deg); }

.invitation-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(232, 200, 193, .8);
  border-radius: 10px 10px 18px 10px;
  padding: 34px 30px 22px;
  text-align: center;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 2px 0 #f1d8d2, 0 20px 60px rgba(103, 49, 57, .08);
}
.invitation-card::before { content: ''; position: absolute; top: 0; left: 28px; right: 28px; border-top: 1px dashed #f1d8d2; }
.kicker { position: relative; z-index: 1; color: #a46e72; font: 10px var(--mono); letter-spacing: .13em; }
.sparkle { color: var(--rose); font-size: 14px; vertical-align: -1px; }
.hero-doodle { width: 186px; height: 34px; margin: 15px auto 1px; position: relative; color: var(--rose); }
.doodle-spark { position: absolute; left: 30px; top: 1px; color: #efb36d; font-size: 22px; transform: rotate(13deg); }
.doodle-heart { position: absolute; top: -8px; left: 82px; font-size: 36px; transform: rotate(-9deg); }
.doodle-flower { position: absolute; right: 28px; top: 3px; color: #dfa7b0; font-size: 22px; transform: rotate(13deg); }
h1, h2 { margin: 0; font-size: clamp(38px, 8vw, 57px); line-height: 1.08; letter-spacing: -.065em; }
.name { color: var(--ink); font-weight: 800; }
.script-word { color: var(--rose); font-family: var(--serif); font-weight: 600; font-style: italic; letter-spacing: -.07em; }
.mobile-break { display: none; }
.intro-copy { margin: 16px auto 22px; color: #766768; font-size: 14px; line-height: 1.7; }
.date-ticket { position: relative; display: flex; align-items: center; gap: 12px; width: min(100%, 453px); margin: 0 auto; border: 1px solid #efdcd5; border-radius: 8px; padding: 13px 16px; text-align: left; background: #fffaf8; box-shadow: 3px 3px 0 #faefeb; }
.ticket-icon { display: grid; flex: none; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: var(--rose-dark); background: #ffe9ec; font-family: var(--serif); font-size: 23px; }
.ticket-copy { display: grid; gap: 3px; }
.ticket-label, .music-label { color: #a77a78; font: 9px var(--mono); letter-spacing: .09em; }
.ticket-copy strong { font-size: 14px; letter-spacing: -.02em; }
.ticket-copy i, .music-copy i { color: var(--rose); font-style: normal; }
.ticket-sub { color: #9b8885; font-size: 10px; }
.ticket-spark { margin-left: auto; color: #e7a570; font-size: 20px; }
.dress-note { margin: 12px 0 4px; color: #907b78; font-size: 11px; font-style: italic; }
.answer-area { margin: 7px auto 0; }
.answer-zone { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; width: min(100%, 360px); height: 126px; margin: 0 auto; }
.button { border: 0; border-radius: 7px; cursor: pointer; font: 700 11px var(--mono); letter-spacing: .045em; }
.button-yes { position: relative; z-index: 1; padding: 15px 18px; color: white; background: var(--rose); box-shadow: 0 4px 0 var(--rose-dark), 0 8px 13px rgba(206, 57, 87, .17); transition: transform .17s ease, box-shadow .17s ease; }
.button-yes span { padding-left: 4px; font-size: 13px; }
.button-yes:hover, .button-yes:focus-visible { transform: scale(1.12) rotate(-1deg); box-shadow: 0 5px 0 var(--rose-dark), 0 10px 18px rgba(206, 57, 87, .24); }
.button-yes:active { transform: scale(1.06); }
.button-no { position: relative; z-index: 2; padding: 13px 17px; color: #806a68; border: 1px solid #e9d9d5; background: #fff; box-shadow: 0 3px 0 #ebdfdb; transition: left .15s ease, top .15s ease, transform .12s ease; }
.button-no.is-fleeing { position: absolute; }
.button:focus-visible, textarea:focus-visible { outline: 3px solid #f4a4b2; outline-offset: 4px; }
.no-caption { min-height: 16px; margin: -5px 0 0; color: #a28885; font-size: 10px; font-style: italic; }
.fine-print { margin: 15px 0 0; color: #b09b97; font: 9px var(--mono); }

.accepted-screen { padding: 8px 0 0; animation: card-arrive .45s cubic-bezier(.2,.9,.3,1.15) both; }
.success-seal { display: grid; width: 43px; height: 43px; margin: 0 auto 12px; place-items: center; border: 1px solid #f4bbc2; border-radius: 50%; color: white; background: var(--rose); box-shadow: 0 3px 0 var(--rose-dark); font-size: 24px; transform: rotate(-8deg); }
.accepted-screen h2 { margin-top: 13px; font-size: clamp(43px, 8vw, 62px); }
.accepted-copy { margin: 12px 0 16px; color: #766768; font-size: 13px; line-height: 1.7; }
.accepted-copy span { color: #a28885; font-size: 11px; font-style: italic; }
.accepted-ticket { display: inline-flex; align-items: center; gap: 9px; margin: 0 auto 18px; border: 1px solid #efdcd5; border-radius: 99px; padding: 8px 13px; color: #7b5e5d; background: #fffaf8; font: 10px var(--mono); }
.accepted-ticket span { color: var(--rose); font-size: 15px; }
.cravings-form { width: min(100%, 463px); margin: 0 auto; padding: 19px 20px 16px; border: 1px solid #efdcd5; border-radius: 9px; text-align: left; background: #fffaf8; }
.cravings-form label { display: block; color: var(--ink); font-size: 14px; font-weight: 700; }
.form-hint { margin: 5px 0 12px; color: #8d7775; font-size: 11px; line-height: 1.6; }
.cravings-form textarea { display: block; width: 100%; min-height: 100px; resize: vertical; border: 1px solid #ead9d4; border-radius: 6px; padding: 12px; color: var(--ink); background: white; font-size: 13px; line-height: 1.55; }
.cravings-form textarea::placeholder { color: #baa8a4; font-family: var(--serif); font-style: italic; }
.form-bottom { display: flex; justify-content: space-between; gap: 10px; margin: 6px 0 11px; color: #a48d88; font: 9px var(--mono); }
.button-save { width: 100%; padding: 13px 15px; color: white; background: var(--rose); box-shadow: 0 3px 0 var(--rose-dark); transition: transform .15s ease, background .15s ease; }
.button-save:hover { background: var(--rose-dark); transform: translateY(-1px); }
.button-save:disabled { cursor: wait; opacity: .65; }
.button-save span { float: right; font-size: 15px; }
.save-status { min-height: 0; margin: 0; color: #748c61; font-size: 11px; line-height: 1.5; }
.save-status:not(:empty) { margin-top: 10px; }
.save-status.is-error { color: #b53c51; }

.music-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 15px auto 0; border: 1px solid #eddad5; border-radius: 8px; padding: 12px; background: rgba(255, 255, 255, .73); }
.music-icon { display: grid; flex: none; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: #b06373; background: #fce9e8; font-size: 19px; }
.music-copy { display: grid; flex: 1; min-width: 170px; gap: 3px; text-align: left; }
.music-copy strong { color: #553a3d; font-size: 12px; }
.music-hint { color: #9a8683; font-size: 10px; }
.button-music { flex: none; padding: 10px 12px; color: #874959; border: 1px solid #efd8dc; background: #fff3f4; font-size: 9px; transition: background .15s ease; }
.button-music:hover { background: #ffe8ec; }
.button-music span { margin-right: 5px; color: var(--rose); }
.video-slot { flex-basis: 100%; width: min(100%, 440px); margin: 3px auto 0; overflow: hidden; border-radius: 6px; background: #f0e3df; aspect-ratio: 16 / 9; }
.video-slot iframe { display: block; width: 100%; height: 100%; border: 0; }
.page-footer { justify-content: space-between; margin-top: 17px; font-size: 8px; letter-spacing: .08em; }
.page-footer span:nth-child(2) { color: var(--rose); font-size: 14px; }

@keyframes card-arrive { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 520px) {
  .page-wrap { width: min(100% - 24px, 665px); padding-top: 23px; }
  .topline { justify-content: flex-start; padding-left: 4px; font-size: 8px; }
  .stamp { right: 2px; font-size: 7px; }
  .invitation-card { padding: 28px 17px 20px; }
  .hero-doodle { margin-top: 14px; }
  h1 { font-size: clamp(38px, 11vw, 52px); }
  .mobile-break { display: initial; }
  .desktop-break { display: none; }
  .intro-copy { max-width: 310px; font-size: 13px; }
  .date-ticket { gap: 9px; padding: 12px 11px; }
  .ticket-copy strong { font-size: 12px; }
  .ticket-sub { font-size: 9px; }
  .ticket-spark { font-size: 15px; }
  .answer-zone { width: 100%; gap: 10px; height: 120px; }
  .button-yes { padding: 14px 12px; font-size: 10px; }
  .button-no { padding: 12px 14px; font-size: 10px; }
  .cravings-form { padding: 16px 13px 14px; }
  .music-card { gap: 9px; padding: 10px; }
  .music-copy { min-width: 135px; }
  .music-hint { font-size: 9px; }
  .button-music { width: 100%; }
  .page-footer { font-size: 7px; }
  .floating-sticker { display: 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; }
}
