:root {
  color: #332e36;
  background: #fffaf6;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; overflow-x: hidden; }

button { font: inherit; color: #332e36; }

.page-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 48px 32px;
  background:
    radial-gradient(circle at 14% 18%, #f9d9e8 0 8%, transparent 29%),
    radial-gradient(circle at 88% 78%, #cff0e3 0 8%, transparent 29%),
    #fffaf6;
}

.page-shell::before {
  position: absolute;
  top: 9%;
  left: 5%;
  width: 390px;
  height: 390px;
  border: 2px dashed #f4accd;
  border-radius: 50%;
  content: "";
  opacity: .8;
  animation: rotate-orbit 26s linear infinite;
}

.orbit-flower,
.floating-mark {
  position: absolute;
  z-index: 0;
  filter: drop-shadow(1px 2px 0 #332e36);
}

.orbit-flower { top: 17%; left: 24%; font-size: 31px; animation: float 3.7s ease-in-out infinite; }
.floating-mark { animation: float 3.5s ease-in-out infinite; }
.mark-one { top: 16%; right: 9%; font-size: 32px; }
.mark-two { bottom: 12%; left: 19%; font-size: 24px; animation-delay: -1.4s; }
.mark-three { right: 20%; bottom: 13%; font-size: 25px; animation-delay: -.7s; }

.date-pass {
  z-index: 1;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  width: min(930px, 100%);
  min-height: 506px;
  overflow: hidden;
  border: 4px solid #332e36;
  border-radius: 38px;
  background: #fffdfb;
  box-shadow: 13px 15px 0 #f155ad;
  transform: rotate(-.6deg);
  animation: card-in 760ms cubic-bezier(.2, .9, .25, 1.2) both;
}

.pass-identity {
  position: relative;
  padding: 46px 32px;
  background: linear-gradient(155deg, #ffe9f3, #feeef6 54%, #e1f5eb);
}

.pass-identity::after {
  position: absolute;
  top: 0;
  right: -16px;
  bottom: 0;
  width: 30px;
  background: radial-gradient(circle at 0 16px, transparent 16px, #332e36 17px, transparent 19px) 0 0 / 30px 32px;
  content: "";
}

.pass-code { margin: 0; color: #f052aa; font-size: 12px; font-weight: 900; letter-spacing: 2px; }

.avatar-frame {
  position: relative;
  width: 192px;
  height: 192px;
  margin: 92px auto 21px;
  overflow: hidden;
  border: 4px solid #332e36;
  border-radius: 35px;
  background: #fff9ee;
  box-shadow: 9px 9px 0 #f052aa;
  transform: rotate(4deg);
  animation: avatar-bob 4s ease-in-out infinite;
}

.avatar-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.pass-identity { position: relative; }
.avatar-cheer { animation: avatar-cheer 620ms cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes avatar-cheer {
  0% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(1.16) rotate(-5deg) translateY(-4px); }
  55% { transform: scale(1.04) rotate(5deg); }
  75% { transform: scale(1.1) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.avatar-emoji {
  position: absolute; top: 96px; left: 50%; z-index: 6;
  display: flex; flex-direction: row; align-items: center; gap: 6px;
  pointer-events: none; white-space: nowrap;
  animation: avatar-emoji 1500ms ease-out forwards;
}
.avatar-emoji-face { font-size: 34px; line-height: 1; }
.avatar-emoji-text {
  color: #a31257; font-size: 17px; font-weight: 900;
  text-shadow: 0 1px 0 #fff, 0 0 4px rgba(255, 255, 255, .9);
}
@keyframes avatar-emoji {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(.4); }
  20% { opacity: 1; transform: translate(-50%, -8px) scale(1.08); }
  75% { opacity: 1; transform: translate(-50%, -30px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -48px) scale(1); }
}
.identity-note { margin: 0; color: #726974; font-size: 14px; font-weight: 800; text-align: center; }

.pass-content { position: relative; padding: 52px 58px; }
.top-flourish { width: 46px; margin: 4px 0 22px; border-top: 4px solid #f052aa; border-radius: 99px; }
h1 { margin: 0 0 17px; font-size: clamp(38px, 4.4vw, 52px); font-weight: 950; letter-spacing: -3px; line-height: 1.08; }
h1 span { font-size: .69em; letter-spacing: -2px; }
.prompt { margin: 0; color: #756e77; font-size: 18px; font-weight: 750; }

.prompt-flourish { display: flex; width: 176px; gap: 10px; align-items: center; margin: 22px 0 8px; color: #f052aa; }
.prompt-flourish i { flex: 1; border-top: 2px dashed #f4accd; }
.prompt-flourish span { font-size: 17px; line-height: 1; }

.corner-doodles { position: absolute; top: 62px; right: 58px; width: 116px; height: 116px; pointer-events: none; }
.doodle-heart,
.doodle-star,
.doodle-dot { position: absolute; display: grid; place-items: center; border: 3px solid #332e36; box-shadow: 4px 4px 0 #f4b8d5; }
.doodle-heart { top: 4px; right: 8px; width: 42px; height: 42px; border-radius: 14px 14px 18px 18px; background: #fff0f7; color: #f052aa; font-size: 24px; transform: rotate(11deg); }
.doodle-star { bottom: 8px; left: 9px; width: 38px; height: 38px; border-radius: 50%; background: #e1f5eb; color: #2aa87c; font-size: 25px; transform: rotate(-12deg); }
.doodle-dot { right: 0; bottom: 0; width: 17px; height: 17px; border-radius: 50%; background: #f6d161; box-shadow: 2px 2px 0 #332e36; }
.dotted-route { position: absolute; right: 130px; bottom: 68px; width: 172px; height: 74px; border-top: 2px dashed #f4accd; border-radius: 50%; pointer-events: none; transform: rotate(-12deg); }
.dotted-route span { position: absolute; top: -16px; right: -3px; color: #f052aa; font-size: 21px; transform: rotate(12deg); }

.escape-zone { position: relative; display: flex; min-height: 84px; gap: 22px; margin-top: 15px; align-items: center; }
.accept-button,
.reject-button { min-height: 57px; border: 4px solid #332e36; cursor: pointer; font-size: 20px; font-weight: 900; white-space: nowrap; }
.accept-button { padding: 13px 32px; border-radius: 17px; background: #f052aa; box-shadow: 5px 5px 0 #332e36; }
.reject-button { padding: 13px 31px; border-radius: 999px; background: #fff; box-shadow: 3px 3px 0 #f2bfd6; }
.reject-button.is-escaping { position: fixed; z-index: 20; transition: left 160ms ease, top 160ms ease, transform 160ms ease; transform: rotate(-4deg) scale(.96); }

button:focus-visible { outline: 4px solid #2aa87c; outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.schedule-panel { position: relative; min-height: 398px; margin-top: -28px; padding-bottom: 68px; }
.schedule-panel h1 { margin-top: 0; font-size: clamp(32px, 3.7vw, 43px); }
.schedule-panel .prompt { font-size: 15px; }
.date-card-grid { display: grid; grid-template-columns: 1fr; gap: 13px; margin-top: 22px; }
.date-card { padding: 13px; border: 3px solid #332e36; border-radius: 16px; background: linear-gradient(145deg, #fff0f7, #fffdfb); box-shadow: 4px 5px 0 #f4b8d5; }
.date-card:nth-child(2) { background: linear-gradient(145deg, #e1f5eb, #fffdfb); }
.date-card h2 { display: flex; justify-content: space-between; margin: 0 0 10px; color: #f052aa; font-size: 15px; }
.date-card h2 span { color: #766e77; font-size: 12px; }
.schedule-slot { display: block; width: 100%; margin-top: 7px; padding: 8px; border: 2px solid #332e36; border-radius: 9px; color: #332e36; cursor: pointer; font-size: 14px; font-weight: 900; text-align: left; transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.schedule-slot.is-busy { background: #e1f5eb; }
.schedule-slot.is-free { border-style: dashed; background: #fff7c8; }
.schedule-slot.is-adjusted { background: #fff0f7; color: #332e36; }
.original-slot { display: inline-block; }
.is-adjusted .original-slot { color: #837784; text-decoration: line-through; text-decoration-thickness: 2px; }
.adjusted-message { display: inline; margin-left: 14px; color: #a31257; font-size: 14px; font-weight: 950; letter-spacing: .5px; }
.schedule-slot.is-selected { border-color: #f052aa; background: #fffdfb; box-shadow: 3px 3px 0 #f052aa; transform: translate(-2px, -2px); }
.schedule-slot.is-selected::after { float: right; color: #f052aa; content: '✓'; font-size: 17px; line-height: 1; }
#confirm-time-button { position: absolute; bottom: 0; left: 0; margin: 0; padding: 12px 22px; border: 4px solid #332e36; border-radius: 15px; background: #f052aa; box-shadow: 4px 4px 0 #332e36; cursor: pointer; font-size: 16px; font-weight: 900; }
#confirm-time-button:disabled { cursor: default; opacity: .72; }

.food-panel { position: relative; margin-top: -22px; }
.food-heading-decoration { display: flex; width: 125px; gap: 9px; align-items: center; margin-bottom: 7px; color: #f052aa; }
.food-heading-decoration i { flex: 1; border-top: 3px solid #f052aa; border-radius: 99px; }
.food-heading-decoration span { font-size: 18px; }
.food-panel h1 { margin: 0 0 12px; font-size: clamp(35px, 4vw, 47px); }
.food-panel .prompt { margin-bottom: 21px; }
.food-option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.food-option { display: flex; min-height: 104px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; position: relative; border: 3px solid #332e36; border-radius: 15px; background: #fffdfb; box-shadow: 3px 4px 0 #332e36; color: #332e36; cursor: pointer; font-size: 16px; font-weight: 900; transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.food-icon { font-size: 31px; line-height: 1; }
.food-option:nth-child(3n + 2) { background: #fff0f7; }
.food-option:nth-child(3n) { background: #e1f5eb; }
.food-option.is-selected { border-color: #f052aa; box-shadow: 5px 5px 0 #f052aa; transform: translate(-2px, -2px) rotate(-1deg); animation: select-pop 340ms ease; }
.food-option.is-selected::after { position: absolute; top: 8px; right: 10px; color: #f052aa; content: '✓'; font-size: 20px; animation: check-pop 320ms ease; }
#confirm-food-button { display: block; width: fit-content; margin: 18px auto 0; padding: 14px 28px; border: 4px solid #332e36; border-radius: 15px; background: #ffc6e0; box-shadow: 4px 4px 0 #332e36; cursor: pointer; font-size: 17px; font-weight: 900; transition: transform 160ms ease, box-shadow 160ms ease; }
#confirm-food-button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #332e36; }
#confirm-food-button:active { transform: translate(0, 0); box-shadow: 3px 3px 0 #332e36; }
#confirm-food-button[hidden] { display: none; }

.activity-panel { position: relative; margin-top: -22px; }
.activity-panel h1 { margin: 0 0 12px; font-size: clamp(35px, 4vw, 47px); }
.activity-panel .prompt { margin-bottom: 21px; }
.activity-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.activity-option { display: flex; min-height: 104px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; position: relative; border: 3px solid #332e36; border-radius: 15px; background: #fffdfb; box-shadow: 3px 4px 0 #332e36; color: #332e36; cursor: pointer; font-size: 16px; font-weight: 900; transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.activity-option:nth-child(2n) { background: #e1f5eb; }
.activity-option.is-selected { border-color: #f052aa; box-shadow: 5px 5px 0 #f052aa; transform: translate(-2px, -2px) rotate(-1deg); animation: select-pop 340ms ease; }
.activity-option.is-selected::after { position: absolute; top: 8px; right: 10px; color: #f052aa; content: '✓'; font-size: 20px; animation: check-pop 320ms ease; }

/* 选项悬停反馈（按钮不加） */
.schedule-slot:hover,
.food-option:hover,
.activity-option:hover { border-color: #f052aa; box-shadow: 6px 8px 0 #f052aa; }
.schedule-slot:not(.is-selected):hover,
.food-option:not(.is-selected):hover,
.activity-option:not(.is-selected):hover { transform: translateY(-3px) scale(1.03); }
.schedule-slot.is-selected:hover,
.food-option.is-selected:hover,
.activity-option.is-selected:hover { transform: translate(-2px, -5px) rotate(-1deg); }
#confirm-activity-button { display: block; width: fit-content; margin: 18px auto 0; padding: 14px 28px; border: 4px solid #332e36; border-radius: 15px; background: #ffc6e0; box-shadow: 4px 4px 0 #332e36; cursor: pointer; font-size: 17px; font-weight: 900; transition: transform 160ms ease, box-shadow 160ms ease; }
#confirm-activity-button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #332e36; }
#confirm-activity-button:active { transform: translate(0, 0); box-shadow: 3px 3px 0 #332e36; }
#confirm-activity-button[hidden] { display: none; }

.summary-panel { position: relative; margin-top: -22px; }
.summary-panel h1 { margin: 0 0 12px; font-size: clamp(34px, 3.9vw, 46px); }
.summary-panel .prompt { margin-bottom: 21px; }
.summary-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.summary-item { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 3px solid #332e36; border-radius: 15px; background: #fffdfb; box-shadow: 3px 4px 0 #332e36; }
.summary-item:nth-child(2) { background: #fff0f7; }
.summary-item:nth-child(3) { background: #e1f5eb; }
.summary-icon { font-size: 28px; line-height: 1; }
.summary-text { font-size: 18px; font-weight: 800; }
.summary-text b { display: block; margin-bottom: 2px; color: #f052aa; font-size: 14px; letter-spacing: 1px; }
.date-countdown { display: block; width: fit-content; margin: 20px auto 0; padding: 13px 26px; border: 4px solid #332e36; border-radius: 15px; background: #ffc6e0; box-shadow: 4px 4px 0 #332e36; color: #a31257; font-size: 20px; font-weight: 950; letter-spacing: 1px; font-variant-numeric: tabular-nums; }

.panel-enter { animation: panel-in 360ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes panel-in {
  from { opacity: 0; transform: translateX(30px) scale(.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.pop-heart { position: absolute; bottom: 62%; font-size: 22px; pointer-events: none; animation: heart-float 1000ms ease-out forwards; }
@keyframes select-pop {
  0% { transform: translate(-2px, -2px) rotate(-1deg) scale(1); }
  45% { transform: translate(-2px, -2px) rotate(-1deg) scale(1.08); }
  100% { transform: translate(-2px, -2px) rotate(-1deg) scale(1); }
}
@keyframes check-pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
@keyframes heart-float {
  0% { opacity: 0; transform: translateY(0) scale(.6); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-46px) scale(1.1); }
}

.falling-petal { position: absolute; top: -40px; font-size: 20px; opacity: .85; animation: petal-fall linear infinite; }
@keyframes petal-fall {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
  10% { opacity: .85; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: .85; }
}
@keyframes avatar-bob {
  0%, 100% { transform: rotate(4deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-6px); }
}
@keyframes card-in {
  0% { opacity: 0; transform: translateY(-40px) rotate(-.6deg) scale(.92); }
  60% { opacity: 1; transform: translateY(8px) rotate(-.6deg) scale(1.01); }
  100% { transform: translateY(0) rotate(-.6deg) scale(1); }
}

.confetti { position: absolute; top: -30px; z-index: 2; pointer-events: none; animation: confetti-fall linear forwards; }
@keyframes confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(660px) rotate(540deg); opacity: 0; }
}
.confetti-rise { position: absolute; bottom: -30px; z-index: 2; pointer-events: none; animation: confetti-rise linear forwards; }
@keyframes confetti-rise {
  0% { transform: translateY(20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-700px) rotate(-540deg); opacity: 0; }
}

.summary-item { animation: item-pop 480ms cubic-bezier(.2, .9, .3, 1.2) both; }
.summary-item:nth-child(1) { animation-delay: 140ms; }
.summary-item:nth-child(2) { animation-delay: 260ms; }
.summary-item:nth-child(3) { animation-delay: 380ms; }
@keyframes item-pop {
  0% { opacity: 0; transform: translateY(16px) scale(.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.burst-heart {
  position: fixed; left: 50%; top: 42%; z-index: 50; pointer-events: none;
  font-size: 120px; transform: translate(-50%, -50%);
  animation: burst-heart 1500ms cubic-bezier(.2, 1.5, .4, 1) forwards;
}
@keyframes burst-heart {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}
.burst-spark {
  position: fixed; left: 50%; top: 42%; z-index: 50; pointer-events: none;
  transform: translate(-50%, -50%);
  animation: burst-spark 1500ms ease-out forwards;
}
@keyframes burst-spark {
  0% { opacity: 1; transform: translate(-50%, -50%) translate(0, 0) scale(.4); }
  100% { opacity: 0; transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(1.1); }
}
.done-flash {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  background: radial-gradient(circle at center, rgba(255, 224, 130, .6), rgba(255, 224, 130, 0) 62%);
  animation: done-flash 700ms ease-out forwards;
}
@keyframes done-flash {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}
.countdown-done { color: #b8860b; background: #fff0c2; border-color: #b8860b; }
.done-pop { animation: done-pop 640ms cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes done-pop {
  0% { transform: scale(.5) rotate(-8deg); }
  55% { transform: scale(1.18) rotate(3deg); }
  100% { transform: scale(1) rotate(0); }
}
.title-pop { animation: title-pop 620ms cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes title-pop {
  0% { opacity: 0; transform: scale(.6) rotate(-4deg); }
  60% { opacity: 1; transform: scale(1.08) rotate(1deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes rotate-orbit { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-13px) rotate(10deg); } }

@media (max-width: 800px) {
  .page-shell { min-height: 100dvh; padding: 14px; }
  .date-pass { grid-template-columns: 1fr; min-height: 0; transform: none; }
  .pass-identity { padding: 20px 22px; }
  .pass-identity::after { top: auto; right: 0; bottom: -16px; left: 0; width: auto; height: 30px; background: radial-gradient(circle at 16px 0, transparent 16px, #332e36 17px, transparent 19px) 0 0 / 32px 30px; }
  .avatar-frame { width: 108px; height: 108px; margin: 14px auto 10px; }
  .pass-content { padding: 28px 22px 38px; }
  h1 { margin-bottom: 12px; font-size: 35px; }
  .prompt-flourish { margin: 14px 0 6px; }
  .escape-zone { min-height: 70px; margin-top: 8px; gap: 14px; }
  .accept-button, .reject-button { min-height: 52px; font-size: 18px; }
  .corner-doodles { top: 34px; right: 25px; transform: scale(.75); transform-origin: top right; }
  .dotted-route { right: 80px; bottom: 47px; transform: rotate(-12deg) scale(.7); transform-origin: right bottom; }
  .page-shell::before { width: 230px; height: 230px; }
  .schedule-panel { min-height: 0; margin-top: 0; }
  .food-panel { margin-top: 0; }
}

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