:root {
  color-scheme: light;
  --ink: #5b3f46;
  --muted: #9b7880;
  --pink: #ef7796;
  --pink-deep: #dc577a;
  --pink-soft: #ffdbe5;
  --blush: #fff0f2;
  --cream: #fffaf4;
  --line: #f2cdd7;
  --white: #fffefd;
  --shadow: 0 24px 70px rgba(132, 79, 94, 0.16), 0 4px 18px rgba(132, 79, 94, 0.08);
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #fff8f5; }
body { min-height: 100%; margin: 0; color: var(--ink); }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.screen[hidden], .progress[hidden] { display: none !important; }

.app-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: max(26px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(26px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 197, 214, .62) 0 2px, transparent 3px),
    radial-gradient(circle at 86% 82%, rgba(238, 119, 150, .35) 0 3px, transparent 4px),
    linear-gradient(145deg, #fffaf3 0%, #ffe9ef 46%, #fff8f3 100%);
}

.ambient-hearts span { position: absolute; color: rgba(221, 87, 122, .3); font-family: serif; font-size: 36px; animation: drift 8s ease-in-out infinite; }
.ambient-hearts span:nth-child(1) { left: 8%; top: 16%; }
.ambient-hearts span:nth-child(2) { right: 9%; top: 12%; font-size: 19px; animation-delay: -2s; }
.ambient-hearts span:nth-child(3) { right: 5%; bottom: 18%; font-size: 50px; animation-delay: -4s; }
.ambient-hearts span:nth-child(4) { left: 13%; bottom: 13%; font-size: 25px; animation-delay: -1s; }
.ambient-hearts span:nth-child(5) { left: 3%; top: 56%; font-size: 24px; animation-delay: -5s; }
.ambient-hearts span:nth-child(6) { right: 15%; top: 46%; font-size: 28px; animation-delay: -3s; }

.card {
  width: min(100%, 620px);
  min-height: min(820px, calc(100dvh - 52px));
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  padding: 0 42px 38px;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 42px;
  background: linear-gradient(155deg, rgba(255, 255, 255, .98), rgba(255, 250, 246, .96));
  box-shadow: var(--shadow);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% -8%, rgba(255, 208, 219, .43), transparent 34%);
}

.topbar { height: 92px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; flex: 0 0 auto; }
.topbar h1 { margin: 0; text-align: center; font-size: 21px; line-height: 1.3; letter-spacing: 0; color: #6c4a52; }
.icon-button { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #fff1f4; color: var(--pink-deep); font-size: 24px; cursor: pointer; transition: transform .2s, background .2s; }
.back-button[hidden] { display: block; visibility: hidden; pointer-events: none; }
.icon-button:hover { transform: scale(1.07); background: #ffe2e9; }

.progress { height: 4px; overflow: hidden; flex: 0 0 auto; border-radius: 4px; background: #f9e4e8; }
.progress-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--pink); transition: width .5s cubic-bezier(.22,1,.36,1); }

.screen { flex: 1; width: 100%; text-align: center; }
.screen.is-entering { animation: screenIn .55s cubic-bezier(.22,1,.36,1) both; }
.invite-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 40px; }
.step-screen { padding-top: 48px; }
.step-screen h2, .invite-screen h2 { margin: 12px 0 12px; color: #563a43; font-size: clamp(27px, 6vw, 38px); line-height: 1.34; letter-spacing: 0; }
.screen h2:focus { outline: none; }
.invite-screen h2 { margin-top: 8px; font-size: clamp(30px, 6vw, 42px); }
.eyebrow, .step-label { margin: 0; color: var(--pink-deep); font-size: 12px; font-weight: 700; letter-spacing: .16em; }
.supporting { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }

.heart-orbit { position: relative; width: 196px; height: 196px; display: grid; place-items: center; margin: 0 auto 28px; }
.dash-ring { position: absolute; inset: 6px; border: 2px dashed #ef9db1; border-radius: 50%; animation: spin 22s linear infinite; }
.dash-ring::after { content: "♥"; position: absolute; left: 19px; top: -10px; color: var(--pink-deep); font-size: 22px; background: var(--white); padding: 2px 5px; }
.cream-heart {
  width: 118px; height: 108px; display: grid; place-items: center; border-radius: 50%;
  background: #fff0f3; box-shadow: 0 16px 35px rgba(221,87,122,.16), inset 0 0 0 1px white;
  transform: rotate(-5deg);
}
.cream-heart span { color: #f27e9b; font-family: serif; font-size: 90px; line-height: 1; filter: drop-shadow(0 6px 0 rgba(255,255,255,.8)); }
.orbit-spark { position: absolute; color: #e9ad51; font-style: normal; }
.orbit-spark.s1 { right: 10px; top: 22px; font-size: 21px; }
.orbit-spark.s2 { left: 5px; bottom: 32px; font-size: 18px; }
.orbit-spark.s3 { right: 24px; bottom: 5px; font-size: 12px; }

.decision-zone { position: relative; width: 100%; height: 144px; margin-top: 30px; }
.primary-button, .secondary-button, .decline-button {
  border: 0; border-radius: 999px; font-weight: 700; cursor: pointer; transition: transform .22s, box-shadow .22s, background .22s;
}
.primary-button { min-height: 54px; padding: 14px 30px; color: white; background: linear-gradient(135deg, #f17d9a, #df5b7d); box-shadow: 0 12px 24px rgba(222, 86, 122, .25); }
.primary-button:hover { transform: translateY(-2px) scale(1.025); box-shadow: 0 16px 30px rgba(222, 86, 122, .3); }
.primary-button:active { transform: translateY(0) scale(.98); }
.accept-button { position: absolute; left: 50%; top: 0; min-width: 164px; transform: translateX(-50%); font-size: 17px; z-index: 2; }
.accept-button:hover { transform: translateX(-50%) translateY(-2px) scale(1.025); }
.decline-button { position: absolute; left: calc(50% - 46px); top: 80px; width: 92px; min-height: 42px; padding: 8px 12px; color: #a37b85; border: 1px solid var(--line); background: #fff8f8; box-shadow: 0 5px 14px rgba(113,75,84,.07); transition: left .3s cubic-bezier(.2,.9,.3,1.2), top .3s cubic-bezier(.2,.9,.3,1.2), transform .2s; white-space: nowrap; }
.decline-button:hover { transform: scale(1.04); }

.emoji-cloud { height: 180px; position: relative; max-width: 400px; margin: 4px auto 24px; }
.emoji-cloud span { position: absolute; display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; background: #fff3f5; box-shadow: 0 12px 25px rgba(157,83,101,.12); font-size: 31px; animation: float 3.4s ease-in-out infinite; }
.emoji-cloud span:nth-child(1) { left: 8%; top: 64px; transform: rotate(-8deg); }
.emoji-cloud span:nth-child(2) { left: 29%; top: 7px; width: 78px; height: 78px; font-size: 38px; animation-delay: -.7s; }
.emoji-cloud span:nth-child(3) { right: 18%; top: 20px; animation-delay: -1.3s; }
.emoji-cloud span:nth-child(4) { right: 3%; top: 89px; width: 58px; height: 58px; animation-delay: -2s; }
.emoji-cloud span:nth-child(5) { left: 38%; bottom: 1px; width: 54px; height: 54px; animation-delay: -1.8s; }
.emoji-cloud span:nth-child(6) { left: 1%; top: 3px; width: 52px; height: 52px; font-size: 24px; animation-delay: -1.1s; }
.surprise-badge { display: inline-grid; place-items: center; min-width: 72px; min-height: 32px; margin-bottom: 22px; border-radius: 99px; background: #fff0bd; color: #a36c19; font-family: "DM Serif Display", serif; transform: rotate(-4deg); box-shadow: 4px 5px 0 #f1c85e; }
.step-screen > .next-button { margin-top: 34px; min-width: 190px; }

.choice-group { border: 0; margin: 32px 0 24px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.date-card { position: relative; min-height: 158px; padding: 22px 14px; display: flex; flex-direction: column; justify-content: center; border: 1.5px solid #f0d8dd; border-radius: 22px; background: #fffdfb; cursor: pointer; transition: transform .2s, border-color .2s, background .2s, box-shadow .2s; }
.date-card:hover { transform: translateY(-3px); border-color: #ed9eb3; box-shadow: 0 10px 24px rgba(172,93,112,.1); }
.date-card.is-selected { border-color: var(--pink); background: #fff0f3; box-shadow: inset 0 0 0 1px var(--pink), 0 10px 22px rgba(221,87,122,.1); }
.date-card:has(input:focus-visible), .menu-option:has(input:focus-visible), .activity-option:has(input:focus-visible) { outline: 3px solid #b5385a; outline-offset: 3px; }
.date-card input, .menu-option input { position: absolute; opacity: 0; pointer-events: none; }
.date-weekday { font-size: 14px; color: var(--muted); }
.date-number { margin: 3px 0 -2px; font-family: "DM Serif Display", serif; color: var(--pink-deep); font-size: 51px; line-height: 1; }
.date-month { font-size: 13px; color: var(--muted); }
.time-picker-wrap { position: relative; }
.time-field { width: 100%; min-height: 78px; padding: 11px 13px 11px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #efd2d9; border-radius: 19px; background: linear-gradient(135deg, #fffdfb, #fff4f6); text-align: left; color: #755760; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; }
.time-field:hover { transform: translateY(-2px); border-color: #ed9eb3; box-shadow: 0 10px 24px rgba(172,93,112,.1); }
.time-label { display: flex; align-items: center; gap: 11px; pointer-events: none; }
.time-label > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.time-label strong { color: #674951; font-size: 14px; }
.time-label small { color: #ac8991; font-size: 11px; font-weight: 500; }
.time-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--pink-deep); background: #ffe4ea; font-size: 20px; }
.time-display { display: flex; align-items: center; gap: 5px; color: var(--pink-deep); pointer-events: none; }
.time-display b { width: 39px; height: 42px; display: grid; place-items: center; border: 1px solid #efc4cf; border-radius: 11px; background: #fff; color: #62454d; font-family: "DM Serif Display", serif; font-size: 22px; box-shadow: 0 4px 10px rgba(148,78,95,.07); }
.time-display em { color: #d45b7a; font-style: normal; font-weight: 700; }
.time-display > span { margin-left: 2px; color: #d45b7a; font-size: 15px; }
.time-popover { position: absolute; z-index: 30; top: calc(100% + 10px); left: 0; right: 0; padding: 14px; border: 1px solid #edb8c5; border-radius: 19px; background: rgba(255,253,251,.98); box-shadow: 0 20px 45px rgba(124,65,80,.2); backdrop-filter: blur(14px); }
.time-popover[hidden] { display: none; }
.time-popover.is-above { top: auto; bottom: calc(100% + 10px); }
.time-popover-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: #63464e; font-size: 13px; }
.close-time { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; color: var(--pink-deep); background: #fff0f3; cursor: pointer; font-size: 20px; }
.time-wheels { display: grid; grid-template-columns: 1fr 20px 1fr; gap: 9px; align-items: center; }
.time-wheels label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 11px; }
.time-wheels em { color: var(--pink-deep); font-style: normal; font-weight: 700; }
.time-wheels select { width: 100%; height: 94px; padding: 2px; border: 1px solid #efd0d8; border-radius: 12px; outline: 0; color: #63464e; background: #fff8f9; text-align: center; font-weight: 700; scrollbar-width: thin; scrollbar-color: #e989a2 transparent; }
.time-wheels option { padding: 4px; border-radius: 7px; }
.time-wheels option:checked { color: #fff; background: linear-gradient(#e87291, #e87291); }
.confirm-time { width: 100%; min-height: 36px; margin-top: 9px; border: 0; border-radius: 11px; color: #fff; background: var(--pink); cursor: pointer; font-weight: 700; }

.menu-screen { padding-top: 28px; }
.menu-grid { border: 0; margin: 24px 0 20px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.menu-option { position: relative; min-height: 92px; padding: 10px 5px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; border: 1px solid #f0d8dd; border-radius: 16px; background: #fffdfb; color: #755760; cursor: pointer; font-size: 13px; font-weight: 600; transition: transform .2s, border-color .2s, background .2s, color .2s; }
.menu-option:hover { transform: translateY(-3px) scale(1.025); border-color: #ee9eb3; }
.menu-option.is-selected { border-color: var(--pink); background: #ffe8ee; color: var(--pink-deep); box-shadow: inset 0 0 0 1px var(--pink); }
.food-icon { font-size: 27px; line-height: 1.2; }
.other-food { display: block; text-align: left; color: var(--muted); font-size: 13px; }
.other-food input { width: 100%; height: 50px; margin-top: 8px; padding: 0 16px; border: 1px solid #f0d8dd; border-radius: 15px; outline: 0; color: var(--ink); background: #fffdfb; transition: border .2s, box-shadow .2s; }
.other-food input::placeholder { color: #c3a6ac; }
.other-food input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(239,119,150,.13); }
.form-error { margin: 8px 0 -20px; color: #c73e61; font-size: 13px; }

.activity-screen { padding-top: 24px; }
.activity-screen h2 { margin-top: 7px; }
.activity-grid { border: 0; margin: 17px 0 13px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.activity-option { min-height: 64px; padding: 10px 11px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid #efd5dc; border-radius: 15px; background: #fffdfb; color: #6d5058; text-align: left; cursor: pointer; font-size: 12px; font-weight: 600; line-height: 1.55; transition: transform .2s, border-color .2s, background .2s; }
.activity-option:hover { transform: translateY(-2px); border-color: #eb9db2; }
.activity-option input { position: absolute; opacity: 0; }
.check-box { width: 20px; height: 20px; display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; border: 1.5px solid #e6a6b7; border-radius: 6px; color: transparent; background: #fff; font-size: 13px; transition: background .2s, border-color .2s, color .2s; }
.activity-option:has(input:checked) { border-color: var(--pink); background: #ffeaf0; color: var(--pink-deep); }
.activity-option input:checked + .check-box { border-color: var(--pink-deep); color: #fff; background: var(--pink); }
.other-activity { display: block; text-align: left; color: var(--muted); font-size: 12px; }
.other-activity input { width: 100%; height: 42px; margin-top: 6px; padding: 0 13px; border: 1px solid #efd5dc; border-radius: 13px; outline: 0; color: var(--ink); background: #fffdfb; }
.other-activity input:focus, .place-search input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(239,119,150,.13); }
.place-search { height: 48px; margin-top: 12px; padding-left: 13px; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 6px; border: 1px solid #efd5dc; border-radius: 15px; background: #fff; }
.place-search > span { color: var(--pink-deep); font-size: 22px; }
.place-search input { min-width: 0; height: 38px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.place-search input::placeholder { color: #bea0a8; }
.place-search button { height: 38px; margin-right: 4px; padding: 0 18px; border: 0; border-radius: 12px; color: #fff; background: var(--pink); cursor: pointer; font-weight: 700; }
.map-shell { height: 178px; position: relative; overflow: hidden; margin-top: 10px; border: 1px solid #efd5dc; border-radius: 17px; background: #f7f0ee; }
#amap-container { position: absolute; inset: 0; z-index: 1; }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; color: #aa838c; background-color: #f9f1f0; background-image: linear-gradient(rgba(230,192,201,.42) 1px, transparent 1px), linear-gradient(90deg, rgba(230,192,201,.42) 1px, transparent 1px); background-size: 34px 34px; font-size: 12px; }
.map-fallback[hidden] { display: none; }
.map-pin { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50% 50% 50% 0; color: #fff; background: var(--pink); box-shadow: 0 7px 15px rgba(221,87,122,.25); transform: rotate(-45deg); font-size: 10px; }
.map-pin::first-letter { transform: rotate(45deg); }
.locate-button { width: 40px; height: 40px; position: absolute; z-index: 4; right: 10px; bottom: 10px; padding: 0; border: 1px solid #edd2d9; border-radius: 50%; color: var(--pink-deep); background: #fff; box-shadow: 0 5px 12px rgba(95,55,65,.15); cursor: pointer; font-size: 23px; }
.map-status { min-height: 39px; margin: 9px 0 0; padding: 10px 13px; overflow: hidden; border-radius: 12px; color: #765861; background: #fff3f6; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.activity-error { margin-bottom: -21px; }
.activity-screen > .next-button { margin-top: 15px; }

.summary-screen { padding-top: 30px; }
.summary-ticket { position: relative; margin: 20px auto 0; padding: 25px 30px 22px; overflow: hidden; border: 1px solid #f1cfd8; border-radius: 24px; background: linear-gradient(145deg, #fff3f5, #fffbf5); box-shadow: 0 15px 35px rgba(141,73,90,.1); }
.summary-ticket::before { content: ""; position: absolute; left: 0; right: 0; top: 82px; border-top: 1px dashed #eab7c4; }
.ticket-hole { position: absolute; top: 72px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); border: 1px solid #f1cfd8; }
.ticket-hole.left { left: -11px; }
.ticket-hole.right { right: -11px; }
.ticket-mark { width: 42px; height: 42px; margin: 0 auto 25px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--pink); box-shadow: 0 7px 15px rgba(221,87,122,.25); }
.summary-ticket dl { margin: 0; }
.summary-ticket dl div { display: grid; grid-template-columns: 76px 1fr; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(237,196,206,.55); text-align: left; }
.summary-ticket dl div[hidden] { display: none; }
.summary-ticket dt { color: var(--pink-deep); font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.summary-ticket dd { margin: 0; color: #5f424a; font-weight: 700; overflow-wrap: anywhere; }
.summary-ticket > p { margin: 15px 0 0; color: var(--muted); font-size: 13px; }
.final-actions { display: flex; gap: 12px; margin-top: 24px; }
.final-actions button { flex: 1; }
.notify-button:disabled { cursor: wait; opacity: .72; transform: none; }
.notify-status { margin: 11px 0 0; color: #8d6972; text-align: center; font-size: 13px; }
.notify-status.is-success { color: #62825f; }
.notify-status.is-error { color: #bd4161; }
.secondary-button { min-height: 54px; padding: 12px 20px; color: var(--pink-deep); border: 1px solid #edb0bf; background: #fff; }
.secondary-button:hover { transform: translateY(-2px); background: #fff2f5; }
#share-canvas { position: fixed; left: -9999px; width: 1px; height: 1px; pointer-events: none; }

.sparkles i { position: absolute; z-index: 2; color: #dfaf55; font-style: normal; pointer-events: none; animation: twinkle 2.5s ease-in-out infinite; }
.sparkles i:nth-child(1) { left: 24px; top: 130px; }
.sparkles i:nth-child(2) { right: 25px; top: 190px; animation-delay: -.8s; }
.sparkles i:nth-child(3) { right: 48px; bottom: 28px; animation-delay: -1.6s; }

:focus-visible { outline: 3px solid #b5385a; outline-offset: 3px; }
.sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes drift { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-15px) rotate(8deg); } }
@keyframes twinkle { 0%,100% { opacity: .35; transform: scale(.75) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(25deg); } }
@keyframes screenIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

@media (max-width: 620px) {
  .app-shell { display: block; padding: 0; }
  .card { width: 100%; min-height: 100dvh; padding: 0 max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); border: 0; border-radius: 0; box-shadow: none; }
  .topbar { height: max(78px, calc(62px + env(safe-area-inset-top))); padding-top: env(safe-area-inset-top); }
  .topbar h1 { font-size: 17px; }
  .invite-screen { padding-bottom: 10px; }
  .heart-orbit { width: 174px; height: 174px; margin-bottom: 20px; }
  .cream-heart { width: 105px; height: 98px; }
  .cream-heart span { font-size: 80px; }
  .step-screen { padding-top: 34px; }
  .menu-screen { padding-top: 22px; }
  .activity-screen { padding-top: 18px; }
  .activity-grid { grid-template-columns: 1fr; gap: 7px; }
  .activity-option { min-height: 50px; }
  .map-shell { height: 166px; }
  .emoji-cloud { height: 160px; margin-bottom: 12px; }
  .emoji-cloud span { transform: scale(.88); }
  .summary-ticket { padding-left: 22px; padding-right: 22px; }
  .final-actions { flex-direction: column; }
}

@media (max-height: 700px) and (min-width: 621px) {
  .card { min-height: calc(100dvh - 30px); }
  .heart-orbit { width: 145px; height: 145px; margin-bottom: 15px; }
  .cream-heart { width: 86px; height: 80px; }
  .cream-heart span { font-size: 66px; }
  .topbar { height: 70px; }
  .step-screen { padding-top: 18px; }
}

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