﻿:root {
  --ink: #3d2030;
  --muted: #8b5f72;
  --paper: #fff7fb;
  --cream: #fffafd;
  --rose: #ff74a9;
  --rose-dark: #bf2f68;
  --coral: #ff9bb8;
  --mint: #75b9a7;
  --gold: #d9a441;
  --ribbon: #ffd3e4;
  --lace: rgba(255, 255, 255, 0.72);
  --line: rgba(73, 38, 50, 0.14);
  --shadow: 0 24px 70px rgba(172, 49, 103, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 10px, transparent 10px 22px),
    linear-gradient(135deg, #ffd3e8 0%, #ffc0dc 42%, #ffe6f0 100%);
  background-size: 44px 44px, 44px 44px, auto, auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.app-shell {
  min-height: 100vh;
  padding: 24px;
}

.romantic-shell {
  display: grid;
  place-items: center;
}

.proposal-scene {
  position: relative;
  width: min(1040px, 100%);
  min-height: min(660px, calc(100vh - 48px));
  display: grid;
  align-content: center;
  gap: 24px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 64px);
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 34px;
  background:
    linear-gradient(rgba(255, 247, 251, 0.88), rgba(255, 232, 242, 0.84)),
    radial-gradient(circle, rgba(255, 255, 255, 0.64) 0 2px, transparent 3px),
    repeating-linear-gradient(135deg, rgba(255, 116, 169, 0.13) 0 12px, rgba(255, 255, 255, 0.16) 12px 24px);
  background-size: auto, 28px 28px, auto;
  box-shadow: var(--shadow);
}

.proposal-scene::before,
.proposal-scene::after {
  content: "";
  position: absolute;
  inset: 16px;
  pointer-events: none;
  border: 1px dashed rgba(191, 47, 104, 0.24);
  border-radius: 26px;
}

.proposal-scene::after {
  inset: auto 34px 28px auto;
  width: 150px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 34px 23px, var(--ribbon) 0 22px, transparent 23px),
    radial-gradient(circle at 116px 23px, var(--ribbon) 0 22px, transparent 23px),
    linear-gradient(90deg, transparent 0 40px, #f7a9c6 40px 110px, transparent 110px);
  opacity: 0.7;
}

.proposal-copy {
  max-width: 850px;
  z-index: 1;
}

.proposal-topbar {
  position: relative;
  z-index: 3;
  display: flex;
  width: min(934px, 100%);
  min-height: 48px;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.kicker {
  margin: 0 0 12px;
  color: var(--rose-dark);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 9vw, 8.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.proposal-copy h1 {
  max-width: 800px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 6.4vw, 6rem);
  line-height: 0.98;
}

h2 {
  margin: 0;
  font-size: 1.25rem;
}

.proposal-actions {
  display: grid;
  width: min(934px, 100%);
  grid-template-columns: minmax(0, 1fr) 136px;
  align-items: center;
  gap: 18px;
  z-index: 2;
}

.yes-button {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 126px;
  overflow: visible;
  padding: clamp(22px, 3.2vw, 34px);
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 30px;
  color: white;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 35%),
    linear-gradient(135deg, #ff65a2 0%, #e54585 48%, #ff9fba 100%);
  box-shadow:
    inset 0 0 0 2px rgba(191, 47, 104, 0.16),
    0 18px 42px rgba(189, 36, 87, 0.32);
  font-size: clamp(1.22rem, 3.4vw, 2.25rem);
  font-weight: 950;
  line-height: 1.08;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.yes-button::before,
.yes-button::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.yes-button::before {
  inset: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.64);
  border-radius: 23px;
}

.yes-button::after {
  right: -14px;
  bottom: -14px;
  width: 112px;
  height: 88px;
  background:
    radial-gradient(circle at 18px 22px, #fff 0 10px, #ffd3e4 11px 17px, transparent 18px),
    radial-gradient(circle at 50px 46px, #fff 0 9px, #ffd3e4 10px 16px, transparent 17px),
    radial-gradient(circle at 78px 22px, #fff 0 10px, #ffd3e4 11px 17px, transparent 18px),
    linear-gradient(135deg, transparent 0 58%, rgba(117, 185, 167, 0.9) 59% 64%, transparent 65%);
  opacity: 0.95;
}

.yes-copy {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 680px;
}

.yes-flowers {
  position: absolute;
  top: -18px;
  left: 28px;
  padding: 6px 13px;
  border: 1px solid rgba(191, 47, 104, 0.18);
  border-radius: 999px;
  color: var(--rose-dark);
  background: rgba(255, 250, 253, 0.94);
  box-shadow: 0 8px 20px rgba(172, 49, 103, 0.16);
  font-size: 1rem;
  letter-spacing: 0.18em;
}

.yes-button:hover {
  transform: translateY(-4px) rotate(-0.4deg);
  box-shadow:
    inset 0 0 0 2px rgba(191, 47, 104, 0.16),
    0 24px 58px rgba(189, 36, 87, 0.42);
}

.my-dates-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(191, 47, 104, 0.18);
  border-radius: 999px;
  color: var(--rose-dark);
  background: rgba(255, 250, 253, 0.92);
  box-shadow: 0 10px 24px rgba(172, 49, 103, 0.14);
  font-weight: 950;
}

.heart-burst span {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff4fa;
  transform: rotate(45deg);
}

.heart-burst span::before,
.heart-burst span::after {
  content: "";
  position: absolute;
  width: inherit;
  height: inherit;
  border-radius: 50%;
  background: inherit;
}

.heart-burst span::before {
  left: -50%;
}

.heart-burst span::after {
  top: -50%;
}

.no-button {
  position: relative;
  width: 136px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: #78435a;
  background: transparent;
  transition: left 120ms ease, top 120ms ease;
}

.no-slot {
  display: block;
  width: 136px;
  height: 64px;
  flex: 0 0 136px;
}

.no-card {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border: 2px solid #d6aabe;
  border-radius: 20px 14px 22px 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), transparent 42%),
    linear-gradient(135deg, #fff8fb, #efe1e8);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.8),
    0 10px 22px rgba(102, 67, 82, 0.16);
  font-weight: 950;
  transform: rotate(2deg);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.no-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(120, 67, 90, 0.28);
  border-radius: 14px 9px 16px 9px;
  pointer-events: none;
}

.no-card::after {
  content: "";
  position: absolute;
  right: -16px;
  top: 10px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 211, 228, 0.55);
}

.no-button:hover .no-card {
  border-color: #c68fa8;
  transform: rotate(-4deg) translateY(-2px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.8),
    0 14px 28px rgba(102, 67, 82, 0.2);
}

.no-heart {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 26px;
  overflow: visible;
  fill: #d85b7b;
  filter: drop-shadow(0 2px 3px rgba(120, 67, 90, 0.18));
}

.no-heart-crack {
  fill: #fff8fb;
  stroke: #9e345d;
  stroke-linejoin: round;
  stroke-width: 1.2;
}

.no-card > span {
  position: relative;
  z-index: 1;
}

.floating-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floating-hearts span {
  position: absolute;
  width: 48px;
  height: 48px;
  transform: rotate(45deg);
  opacity: 0.26;
  background: var(--rose);
  animation: float-heart 7s ease-in-out infinite;
}

.floating-hearts span::before,
.floating-hearts span::after {
  content: "";
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: inherit;
}

.floating-hearts span::before {
  left: -24px;
}

.floating-hearts span::after {
  top: -24px;
}

.floating-hearts span:nth-child(1) {
  left: 8%;
  top: 18%;
}

.floating-hearts span:nth-child(2) {
  right: 12%;
  top: 14%;
  width: 32px;
  height: 32px;
  animation-delay: -1s;
  background: #ffaccb;
}

.floating-hearts span:nth-child(2)::before,
.floating-hearts span:nth-child(2)::after {
  width: 32px;
  height: 32px;
}

.floating-hearts span:nth-child(2)::before {
  left: -16px;
}

.floating-hearts span:nth-child(2)::after {
  top: -16px;
}

.floating-hearts span:nth-child(3) {
  right: 26%;
  bottom: 12%;
  animation-delay: -3s;
  background: #ffd7e7;
}

.floating-hearts span:nth-child(4) {
  left: 22%;
  bottom: 18%;
  width: 28px;
  height: 28px;
  animation-delay: -4s;
}

.floating-hearts span:nth-child(4)::before,
.floating-hearts span:nth-child(4)::after {
  width: 28px;
  height: 28px;
}

.floating-hearts span:nth-child(4)::before {
  left: -14px;
}

.floating-hearts span:nth-child(4)::after {
  top: -14px;
}

.floating-hearts span:nth-child(5) {
  right: 8%;
  bottom: 28%;
  width: 38px;
  height: 38px;
  animation-delay: -5s;
}

.floating-hearts span:nth-child(5)::before,
.floating-hearts span:nth-child(5)::after {
  width: 38px;
  height: 38px;
}

.floating-hearts span:nth-child(5)::before {
  left: -19px;
}

.floating-hearts span:nth-child(5)::after {
  top: -19px;
}

.floating-hearts span:nth-child(6) {
  left: 52%;
  top: 9%;
  width: 24px;
  height: 24px;
  animation-delay: -2s;
  background: #ffffff;
}

.floating-hearts span:nth-child(6)::before,
.floating-hearts span:nth-child(6)::after {
  width: 24px;
  height: 24px;
}

.floating-hearts span:nth-child(6)::before {
  left: -12px;
}

.floating-hearts span:nth-child(6)::after {
  top: -12px;
}

.floating-hearts span:nth-child(7) {
  left: 6%;
  bottom: 34%;
  width: 34px;
  height: 34px;
  animation-delay: -6s;
  background: #f8a4c4;
}

.floating-hearts span:nth-child(7)::before,
.floating-hearts span:nth-child(7)::after {
  width: 34px;
  height: 34px;
}

.floating-hearts span:nth-child(7)::before {
  left: -17px;
}

.floating-hearts span:nth-child(7)::after {
  top: -17px;
}

@keyframes float-heart {
  0%,
  100% {
    transform: translateY(0) rotate(45deg) scale(1);
  }
  50% {
    transform: translateY(-18px) rotate(45deg) scale(1.08);
  }
}

.button-heart-particle {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  background: var(--heart-color, #bf2f68);
  filter:
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.95))
    drop-shadow(0 4px 9px rgba(125, 29, 69, 0.34));
  transform: translate(-50%, -50%) rotate(45deg) scale(0.35);
  animation: button-heart-float var(--duration) ease-out forwards;
}

.button-heart-particle::before,
.button-heart-particle::after {
  content: "";
  position: absolute;
  width: inherit;
  height: inherit;
  border-radius: 50%;
  background: inherit;
}

.button-heart-particle::before {
  left: -50%;
}

.button-heart-particle::after {
  top: -50%;
}

@keyframes button-heart-float {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(calc(45deg + var(--spin))) scale(0.35);
  }
  16% {
    opacity: 0.98;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--drift-x)), calc(-50% + var(--drift-y))) rotate(calc(45deg + var(--spin))) scale(1.08);
  }
}

.panel {
  width: min(1040px, 100%);
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.flow-panel {
  position: relative;
  display: grid;
  gap: 24px;
}

.section-heading h1 {
  font-size: clamp(2.4rem, 7vw, 5.3rem);
}

.back-button,
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: white;
  font-size: 2rem;
  line-height: 1;
}

.back-button {
  position: absolute;
  top: 20px;
  right: 20px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.plan-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--cream);
  font-weight: 850;
  text-align: left;
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
}

.plan-card:hover,
.plan-card.selected {
  transform: translateY(-2px);
  border-color: rgba(243, 92, 141, 0.66);
  background: #fff1f6;
}

.plan-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: white;
  font-size: 1.35rem;
}

.custom-plan {
  display: none;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.custom-plan.visible {
  display: grid;
}

.custom-plan input,
.date-input input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: white;
}

.primary-button,
.secondary-button,
.danger-button {
  border: 0;
  border-radius: 14px;
  font-weight: 950;
}

.primary-button {
  min-height: 58px;
  padding: 16px 22px;
  color: white;
  background: linear-gradient(135deg, var(--rose-dark), var(--rose));
  box-shadow: 0 14px 30px rgba(189, 36, 87, 0.24);
}

.primary-button:disabled {
  opacity: 0.45;
  box-shadow: none;
}

button.romantic-action:not(.yes-button):not(.no-button):not(:disabled) {
  position: relative;
  overflow: visible;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

button.romantic-action:not(.yes-button):not(.no-button):hover:not(:disabled),
button.romantic-action:not(.yes-button):not(.no-button):focus-visible:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 28px rgba(189, 36, 87, 0.18);
}

.plan-card.romantic-action:hover:not(:disabled),
.plan-card.romantic-action:focus-visible:not(:disabled) {
  transform: translateY(-4px) rotate(-0.35deg) scale(1.015);
}

.primary-button.romantic-action:hover:not(:disabled),
.primary-button.romantic-action:focus-visible:not(:disabled) {
  background: linear-gradient(135deg, #a9275e, #ff6da5);
  box-shadow: 0 18px 36px rgba(189, 36, 87, 0.28);
}

.back-button.romantic-action:hover:not(:disabled),
.icon-button.romantic-action:hover:not(:disabled),
.back-button.romantic-action:focus-visible:not(:disabled),
.icon-button.romantic-action:focus-visible:not(:disabled) {
  color: white;
  border-color: var(--rose);
  background: var(--rose);
}

.date-button.romantic-action:hover:not(:disabled),
.date-button.romantic-action:focus-visible:not(:disabled),
.time-button.romantic-action:hover:not(:disabled),
.time-button.romantic-action:focus-visible:not(:disabled) {
  border-color: var(--rose);
}

.secondary-button {
  min-height: 42px;
  padding: 10px 14px;
  color: var(--rose-dark);
  background: #fff0f5;
}

.danger-button {
  min-height: 38px;
  padding: 9px 12px;
  color: #8b234a;
  background: #ffe1ec;
  border: 1px solid rgba(191, 47, 104, 0.22);
}

.danger-button:hover {
  color: white;
  background: var(--rose-dark);
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
}

.calendar-box,
.time-box,
.admin-card,
.admin-alert {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
}

.calendar-box,
.time-box {
  padding: 18px;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.calendar-toolbar strong {
  text-align: center;
  font-size: 1.15rem;
  text-transform: capitalize;
}

.weekday-row,
.date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.weekday-row {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-align: center;
}

.date-button,
.date-empty {
  aspect-ratio: 1;
  min-width: 0;
}

.date-button {
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: white;
  font-weight: 900;
}

.date-button:hover,
.date-button.selected {
  border-color: var(--rose);
  color: white;
  background: var(--rose);
}

.date-button:disabled {
  color: #aaa;
  background: #f2eeee;
}

.time-box {
  display: grid;
  align-content: start;
  gap: 14px;
}

.time-grid,
.admin-time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
}

.time-button,
.admin-time {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: white;
  font-weight: 900;
}

.time-button {
  display: grid;
  place-items: center;
  gap: 2px;
}

.time-button small {
  color: #777;
  font-size: 0.68rem;
  font-weight: 800;
}

.time-button.selected {
  border-color: var(--mint);
  color: white;
  background: var(--mint);
}

.time-button:disabled {
  color: #888;
  background: #e5e2e0;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--rose-dark);
  font-weight: 800;
}

.done-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 20px;
  text-align: center;
}

.done-panel h1 {
  font-size: clamp(2.6rem, 8vw, 6rem);
}

.done-actions {
  display: flex;
  width: min(560px, 100%);
  margin: 0 auto;
  gap: 10px;
}

.done-actions > button {
  flex: 1;
}

.summary-card {
  display: grid;
  gap: 8px;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--cream);
}

.summary-card span {
  color: var(--muted);
  font-weight: 850;
}

.summary-card strong {
  font-size: 1.3rem;
}

.my-dates-shell {
  align-items: start;
}

.my-dates-panel {
  width: min(1160px, 100%);
}

.my-dates-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: 18px;
}

.my-calendar-box {
  overflow: hidden;
}

.my-date-grid {
  align-items: stretch;
}

.my-date-button {
  aspect-ratio: auto;
  min-height: 76px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 8px;
  text-align: left;
}

.my-date-button.has-appointment {
  border-color: rgba(191, 47, 104, 0.42);
  background: #fff0f7;
}

.my-date-button.has-appointment:hover,
.my-date-button.has-appointment.selected {
  color: white;
  background: linear-gradient(135deg, #ff66a5, #bf2f68);
}

.day-number {
  font-weight: 950;
}

.calendar-event-pill {
  display: block;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 6px;
  border-radius: 8px;
  color: #8b234a;
  background: #ffd6e7;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-date-button.selected .calendar-event-pill,
.my-date-button.has-appointment:hover .calendar-event-pill {
  color: #7d1d45;
  background: rgba(255, 255, 255, 0.84);
}

.my-date-detail,
.edit-appointment-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
}

.my-date-list {
  display: grid;
  gap: 10px;
}

.my-appointment-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(191, 47, 104, 0.26);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.36)),
    linear-gradient(135deg, #ffe2ee, #ffc1dc);
}

.my-appointment-card div {
  display: grid;
  gap: 4px;
}

.my-appointment-card strong {
  font-size: 1.05rem;
}

.my-appointment-card span,
.my-appointment-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.my-appointment-card .empty-note {
  color: rgba(139, 95, 114, 0.68);
  font-style: italic;
}

.compact-heading {
  display: grid;
  gap: 2px;
}

.compact-heading h2 {
  font-size: clamp(1.4rem, 4vw, 2.1rem);
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.edit-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 900;
}

.edit-grid input,
.edit-grid select,
.edit-grid textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: white;
}

.edit-grid textarea {
  min-height: 104px;
  resize: vertical;
}

.note-field {
  grid-column: 1 / -1;
}

.hidden-field {
  display: none !important;
}

.edit-actions {
  display: flex;
  justify-content: end;
  gap: 10px;
  flex-wrap: wrap;
}

.bucket-shell,
.album-shell {
  align-items: start;
}

.bucket-panel,
.album-panel {
  width: min(980px, 100%);
}

.bucket-list-view,
.bucket-activity-view,
.bucket-day-view,
.bucket-gallery-view,
.album-panel {
  min-height: min(760px, calc(100vh - 48px));
  align-content: start;
}

.bucket-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.bucket-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid rgba(191, 47, 104, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  font-weight: 850;
}

.bucket-stats strong {
  color: var(--rose-dark);
  font-size: 1.05rem;
}

.bucket-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.bucket-add-form label,
.bucket-day-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 900;
}

.bucket-add-form input,
.bucket-day-form input,
.bucket-day-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: white;
}

.bucket-day-form textarea {
  min-height: 132px;
  resize: vertical;
}

.bucket-list-panel,
.bucket-day-list {
  display: grid;
  gap: 10px;
}

.bucket-list-full {
  padding: 0;
  border: 0;
  background: transparent;
}

.bucket-item-card {
  position: relative;
  display: grid;
  grid-template-columns: 46px auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(191, 47, 104, 0.16);
  border-radius: 18px;
  background: rgba(255, 250, 253, 0.86);
  box-shadow: 0 12px 28px rgba(172, 49, 103, 0.1);
}

.bucket-item-actions {
  display: none;
  gap: 6px;
}

.bucket-item-card.actions-open .bucket-item-actions {
  display: flex;
}

.bucket-check-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid rgba(191, 47, 104, 0.3);
  border-radius: 50%;
  color: rgba(191, 47, 104, 0.42);
  background: white;
  box-shadow: inset 0 0 0 5px rgba(255, 211, 228, 0.35);
  font-size: 1.12rem;
  font-weight: 950;
}

.bucket-check-button.filled {
  color: white;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(191, 47, 104, 0.22), inset 0 0 0 2px rgba(255, 255, 255, 0.38);
}

.bucket-check-button.rank-1 { background: linear-gradient(135deg, #ff8db8, #e64586); }
.bucket-check-button.rank-3 { background: linear-gradient(135deg, #ff62a1, #bf2f68); }
.bucket-check-button.rank-5 { background: linear-gradient(135deg, #ff7bb0, #d9a441); }
.bucket-check-button.rank-10 { background: linear-gradient(135deg, #bf2f68, #75b9a7); }
.bucket-check-button.rank-20 { background: linear-gradient(135deg, #8b234a, #d9a441); }
.bucket-check-button.rank-50 { background: conic-gradient(from 20deg, #ff74a9, #d9a441, #75b9a7, #bf2f68, #ff74a9); }

.bucket-count-pill {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--rose-dark);
  background: #fff0f6;
  font-weight: 950;
}

.bucket-item-main {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.bucket-item-main strong {
  font-size: 1.03rem;
}

.bucket-item-main span,
.day-row-copy small,
.gallery-toolbar span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.bucket-day-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 72px;
  border: 1px solid rgba(191, 47, 104, 0.16);
  border-radius: 18px;
  background: rgba(255, 250, 253, 0.88);
  box-shadow: 0 12px 28px rgba(172, 49, 103, 0.1);
}

.bucket-day-row.pending {
  border-style: dashed;
}

.bucket-day-row.all-photos-row {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  width: 100%;
  padding: 12px;
  color: var(--ink);
  text-align: left;
}

.day-row-main {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 72px;
  padding: 12px;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.day-row-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--rose-dark), var(--rose));
  font-weight: 950;
}

.bucket-day-row.pending .day-row-icon {
  color: var(--rose-dark);
  background: #fff0f6;
  border: 1px dashed rgba(191, 47, 104, 0.34);
}

.day-row-copy {
  display: grid;
  gap: 3px;
}

.day-row-copy strong {
  font-size: 1rem;
}

.day-row-arrow {
  color: var(--rose-dark);
  font-size: 1.6rem;
  font-weight: 950;
}

.day-row-actions {
  display: none;
  gap: 6px;
  padding-right: 10px;
}

.bucket-day-row.actions-open .day-row-actions {
  display: flex;
}

.tiny-action {
  width: auto;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
}

.shake-once {
  animation: day-row-shake 420ms ease;
}

@keyframes day-row-shake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  20% { transform: translateX(-2px) rotate(-0.3deg); }
  40% { transform: translateX(2px) rotate(0.3deg); }
  60% { transform: translateX(-1px) rotate(-0.2deg); }
  80% { transform: translateX(1px) rotate(0.2deg); }
}

.bucket-day-form {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(191, 47, 104, 0.16);
  border-radius: 18px;
  background: rgba(255, 250, 253, 0.82);
}

.date-toggle-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #fff0f6;
}

.date-toggle-row input {
  width: 20px;
  min-height: 20px;
}

.muted-field {
  opacity: 0.55;
}

.day-form-actions,
.gallery-toolbar,
.album-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.gallery-toolbar {
  justify-content: space-between;
}

.photo-add-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--rose-dark), var(--rose));
  box-shadow: 0 14px 28px rgba(189, 36, 87, 0.24);
  font-size: 2rem;
  font-weight: 950;
  cursor: pointer;
}

.photo-add-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.photo-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #ffe4ef;
  box-shadow: 0 10px 24px rgba(172, 49, 103, 0.12);
}

.photo-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-touch-callout: none;
}

.photo-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.photo-actions,
.lightbox-actions {
  display: none;
}

.photo-card.actions-open .photo-actions {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 6px;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  left: 0;
  top: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  align-items: center;
  justify-items: center;
  gap: 0;
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
  padding: 0;
  background: #150a12;
}

.photo-lightbox-open {
  overflow: hidden;
}

.lightbox-close {
  position: fixed;
  top: calc(18px + env(safe-area-inset-top, 0px));
  right: calc(18px + env(safe-area-inset-right, 0px));
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(61, 32, 48, 0.52);
  backdrop-filter: blur(10px);
  font-size: 2rem;
  line-height: 1;
}

.lightbox-frame {
  position: relative;
  display: grid;
  grid-column: 1;
  grid-row: 1;
  place-items: center;
  margin: 0;
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  min-width: 0;
  max-width: none;
  max-height: none;
  overflow: hidden;
  background: #150a12;
  touch-action: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.lightbox-image {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform, opacity;
}

.lightbox-frame figcaption {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 2;
  margin: 0;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  background: rgba(61, 32, 48, 0.42);
  backdrop-filter: blur(10px);
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%);
}

.lightbox-frame.actions-open .lightbox-actions {
  position: fixed;
  right: calc(12px + env(safe-area-inset-right, 0px));
  bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  z-index: 3;
  display: flex;
}

.lightbox-current.to-left {
  animation: lightbox-current-to-left 260ms cubic-bezier(0.22, 0.78, 0.22, 1) forwards;
}

.lightbox-current.to-right {
  animation: lightbox-current-to-right 260ms cubic-bezier(0.22, 0.78, 0.22, 1) forwards;
}

.lightbox-incoming.from-right {
  animation: lightbox-incoming-from-right 260ms cubic-bezier(0.22, 0.78, 0.22, 1) forwards;
}

.lightbox-incoming.from-left {
  animation: lightbox-incoming-from-left 260ms cubic-bezier(0.22, 0.78, 0.22, 1) forwards;
}

@keyframes lightbox-current-to-left {
  to { transform: translateX(-38vw) scale(0.94); opacity: 0.28; }
}

@keyframes lightbox-current-to-right {
  to { transform: translateX(38vw) scale(0.94); opacity: 0.28; }
}

@keyframes lightbox-incoming-from-right {
  from { transform: translateX(42vw) scale(0.96); opacity: 0.32; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes lightbox-incoming-from-left {
  from { transform: translateX(-42vw) scale(0.96); opacity: 0.32; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}

.lightbox-dots {
  position: fixed;
  left: 50%;
  bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  z-index: 2;
  display: flex;
  max-width: min(520px, 84vw);
  gap: 6px;
  justify-content: center;
  overflow: hidden;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(61, 32, 48, 0.28);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.lightbox-dots span {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.lightbox-dots span.selected {
  width: 20px;
  border-radius: 999px;
  background: white;
}
.heart-burst {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  overflow: hidden;
}

.heart-burst span {
  left: 50%;
  top: 52%;
  width: 18px;
  height: 18px;
  background: #ff6fa7;
  opacity: 0;
  animation: heart-burst 1500ms cubic-bezier(0.18, 0.78, 0.26, 1) var(--delay) forwards;
}

.heart-burst span:nth-child(3n) {
  background: #ffffff;
}

.heart-burst span:nth-child(4n) {
  background: #ffd1e4;
}

.heart-burst span:nth-child(5n) {
  background: #bf2f68;
}

@keyframes heart-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(45deg) scale(0.2);
  }
  12% {
    opacity: 1;
  }
  72% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(405deg) scale(var(--scale));
  }
}

.admin-shell {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    linear-gradient(135deg, #ffd7e9, #fff3f8);
  background-size: 44px 44px, 44px 44px, auto;
}

.admin-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.admin-login-grid {
  min-height: calc(100vh - 48px);
  place-items: center;
}

.admin-login-card {
  width: min(520px, 100%);
}

.admin-login-card h1 {
  font-size: clamp(2.2rem, 7vw, 4rem);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-header h1 {
  font-size: clamp(2.2rem, 6vw, 4.8rem);
}

.admin-alert {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-color: rgba(243, 92, 141, 0.38);
  background: #fff0f5;
}

.admin-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.date-input {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.admin-time.busy {
  border-color: var(--rose-dark);
  color: white;
  background: var(--rose-dark);
}

.admin-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.appointment-list {
  display: grid;
  gap: 10px;
}

.appointment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.appointment-item.new {
  border-color: rgba(224, 164, 46, 0.6);
  background: #fff9e9;
}

.appointment-item span {
  font-weight: 900;
}

.appointment-copy {
  display: grid;
  gap: 3px;
}

.appointment-copy small {
  color: var(--muted);
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

@media (max-width: 820px) {
  .app-shell {
    padding: 14px;
  }

  .panel {
    padding: 22px;
    border-radius: 20px;
  }

  .proposal-scene {
    min-height: calc(100vh - 28px);
    gap: 18px;
    padding: 28px 22px;
    border-radius: 22px;
  }

  .proposal-topbar {
    min-height: 42px;
  }

  .proposal-copy h1 {
    font-size: clamp(2.35rem, 12vw, 4.8rem);
  }

  .proposal-actions {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 126px;
    gap: 12px;
  }

  .yes-button {
    min-height: 128px;
    padding: 22px;
    font-size: clamp(1.12rem, 5.5vw, 1.75rem);
  }

  .no-slot,
  .no-button {
    width: 126px;
    height: 60px;
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .my-dates-layout,
  .edit-grid,
  .bucket-layout {
    grid-template-columns: 1fr;
  }

  .bucket-list-panel {
    max-height: none;
  }

  .bucket-occurrence-form {
    grid-template-columns: 1fr 1fr;
  }

  .bucket-occurrence-form label {
    grid-column: 1 / -1;
  }

  .my-date-button {
    min-height: 62px;
  }

  .edit-actions {
    justify-content: stretch;
  }

  .edit-actions > button {
    flex: 1 1 180px;
  }

  .bucket-detail-header,
  .occurrence-detail-card header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .my-appointment-card,
  .done-actions {
    grid-template-columns: 1fr;
    display: grid;
  }

  .admin-alert,
  .admin-header,
  .appointment-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-header,
  .appointment-item {
    display: grid;
  }
}

@media (max-width: 520px) {
  .app-shell {
    padding: 10px;
  }

  .panel {
    padding: 18px;
    border-radius: 18px;
  }

  .section-heading h1,
  .admin-header h1 {
    padding-right: 48px;
  }

  .section-heading h1 {
    font-size: clamp(2rem, 12vw, 3.4rem);
  }

  .proposal-scene {
    min-height: calc(100vh - 20px);
    padding: 22px 14px;
  }

  .proposal-topbar {
    justify-content: center;
  }

  .proposal-actions {
    grid-template-columns: minmax(0, 1fr) 108px;
    gap: 8px;
  }

  .yes-button {
    min-height: 122px;
    padding: 20px 16px;
    border-radius: 22px;
    font-size: clamp(0.98rem, 4.8vw, 1.28rem);
  }

  .yes-copy {
    max-width: none;
  }

  .plans-grid {
    grid-template-columns: 1fr;
  }

  .weekday-row,
  .date-grid {
    gap: 4px;
  }

  .date-button {
    border-radius: 10px;
    font-size: 0.86rem;
  }

  .yes-flowers {
    left: 20px;
    top: -15px;
    font-size: 0.82rem;
  }

  .no-slot,
  .no-button {
    width: 108px;
    height: 56px;
  }

  .my-dates-button {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 0.86rem;
  }

  .proposal-topbar .my-dates-button {
    flex: 1 1 96px;
  }

  .calendar-box,
  .time-box,
  .my-date-detail,
  .edit-appointment-form,
  .admin-card {
    padding: 14px;
    border-radius: 15px;
  }

  .calendar-toolbar {
    grid-template-columns: 38px 1fr 38px;
    gap: 6px;
  }

  .calendar-toolbar strong {
    font-size: 0.98rem;
  }

  .back-button,
  .icon-button {
    width: 38px;
    height: 38px;
    font-size: 1.65rem;
  }

  .my-date-button {
    min-height: 42px;
    padding: 5px;
    text-align: center;
  }

  .calendar-event-pill {
    width: 78%;
    height: 7px;
    justify-self: center;
    padding: 0;
    overflow: hidden;
    color: transparent;
    text-indent: -999px;
  }

  .time-grid,
  .admin-time-grid {
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 6px;
  }

  .time-button,
  .admin-time {
    min-height: 44px;
    border-radius: 10px;
    font-size: 0.88rem;
  }

  .my-appointment-card {
    padding: 12px;
  }

  .edit-grid input,
  .edit-grid select,
  .edit-grid textarea,
  .custom-plan input,
  .date-input input {
    min-height: 44px;
    padding: 10px 12px;
  }

  .primary-button,
  .secondary-button,
  .danger-button {
    width: 100%;
  }

  .bucket-add-form {
    grid-template-columns: 1fr;
  }

  .bucket-stats span {
    flex: 1 1 120px;
    justify-content: center;
  }

  .bucket-item-card {
    grid-template-columns: 42px auto minmax(0, 1fr);
    padding: 8px;
    gap: 7px;
  }

  .bucket-item-actions {
    grid-column: 1 / -1;
    justify-content: end;
    padding: 0 4px 4px;
  }

  .bucket-check-button {
    width: 40px;
    height: 40px;
  }

  .bucket-count-pill {
    min-width: 38px;
    height: 30px;
    padding: 0 8px;
  }

  .bucket-item-main {
    min-height: 54px;
    padding: 7px;
  }

  .bucket-day-row {
    grid-template-columns: 1fr;
  }

  .day-row-main,
  .bucket-day-row.all-photos-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    min-height: 66px;
    padding: 10px;
  }

  .day-row-icon {
    width: 36px;
    height: 36px;
  }

  .day-row-actions {
    padding: 0 10px 10px;
    justify-content: end;
  }

  .tiny-action {
    width: auto;
  }

  .day-form-actions,
  .album-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .photo-card {
    border-radius: 12px;
  }

  .photo-add-button {
    width: 50px;
    height: 50px;
  }

  .photo-lightbox {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  .lightbox-close {
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
  }

  .lightbox-dots {
    max-width: 88vw;
    gap: 4px;
    bottom: calc(46px + env(safe-area-inset-bottom, 0px));
  }

  .lightbox-dots span {
    width: 6px;
    height: 6px;
  }

  .lightbox-frame.actions-open .lightbox-actions {
    right: 8px;
    bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  }
}
