/* ══════════════════════════════════════════════════════════
   Date invite — warm, blushy, phone-first.
   Layout uses logical properties throughout so [dir=rtl]
   (Hebrew) flips without a second stylesheet.
   ══════════════════════════════════════════════════════════ */

:root {
  --cream:      #FFF8F3;
  --cream-warm: #FFEFE6;
  --blush:      #FFE0E6;
  --peach:      #FFD3BE;
  --rose:       #E15A78;
  --rose-deep:  #B93A5B;
  --gold:       #F0B03C;
  --plum:       #46232F;
  --plum-soft:  #7A5764;
  --white:      #FFFFFF;

  --line:       color-mix(in srgb, var(--plum) 12%, transparent);
  --shadow-sm:  0 2px 8px rgba(90, 40, 55, .07);
  --shadow-md:  0 10px 30px -8px rgba(90, 40, 55, .18);
  --shadow-lg:  0 24px 60px -18px rgba(90, 40, 55, .30);

  --radius:     22px;
  --radius-pill: 999px;

  --font: "Rubik", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--plum);
  background:
    radial-gradient(120% 90% at 50% -10%, var(--cream-warm) 0%, var(--cream) 55%, #FDF1EC 100%);
  min-height: 100svh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }

/* ── drifting background blobs ─────────────────────────── */
.blobs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  will-change: transform;
}
.blob-1 { width: 46vmax; height: 46vmax; background: var(--blush); top: -14vmax; inset-inline-start: -10vmax; animation: drift-a 26s ease-in-out infinite; }
.blob-2 { width: 38vmax; height: 38vmax; background: var(--peach); bottom: -12vmax; inset-inline-end: -8vmax; animation: drift-b 32s ease-in-out infinite; }
.blob-3 { width: 26vmax; height: 26vmax; background: #FFEFC2; top: 40%; inset-inline-end: 18%; opacity: .45; animation: drift-a 38s ease-in-out infinite reverse; }

@keyframes drift-a { 50% { transform: translate3d(6vmax, 5vmax, 0) scale(1.12); } }
@keyframes drift-b { 50% { transform: translate3d(-7vmax, -4vmax, 0) scale(1.08); } }

/* ── language switcher ─────────────────────────────────── */
.lang-switch {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  inset-inline-end: max(14px, env(safe-area-inset-right));
  z-index: 40;
  display: flex;
  gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}
.lang-switch button {
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--plum-soft);
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  padding: .38em .8em;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.lang-switch button:hover { color: var(--rose-deep); }
.lang-switch button[aria-pressed="true"] { background: var(--rose); color: var(--white); }

/* ── demo banner ───────────────────────────────────────── */
.demo-banner {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: 40;
  max-width: min(92vw, 460px);
  padding: .6em 1.1em;
  font-size: .78rem;
  line-height: 1.45;
  text-align: center;
  color: #6A4A12;
  background: rgba(255, 243, 214, .95);
  border: 1px solid rgba(240, 176, 60, .5);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
[dir="rtl"] .demo-banner { transform: translateX(50%); }

/* ── screens & card ────────────────────────────────────── */
#app { position: relative; z-index: 1; }

.screen {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(20px, 6vw, 48px) clamp(16px, 5vw, 40px);
  animation: screen-in .5s var(--ease-spring) both;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
}

.card {
  width: min(100%, 460px);
  padding: clamp(28px, 6vw, 44px) clamp(22px, 5vw, 40px);
  text-align: center;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.card-wide { width: min(100%, 560px); text-align: start; }
.card-ask  { position: relative; }

.hero-emoji {
  font-size: clamp(2.8rem, 11vw, 3.9rem);
  line-height: 1;
  margin-block-end: .35em;
  filter: drop-shadow(0 6px 12px rgba(90, 40, 55, .18));
}
.floaty { animation: floaty 4.5s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-9px) rotate(-4deg); } }

.display {
  margin: 0 0 .45em;
  font-size: clamp(1.55rem, 6.4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.015em;
  text-wrap: balance;
  background: linear-gradient(105deg, var(--rose-deep), var(--rose) 55%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.card-wide .display { font-size: clamp(1.35rem, 5.4vw, 1.85rem); }

.lede {
  margin: 0 0 1.6em;
  font-size: clamp(.95rem, 3.6vw, 1.03rem);
  line-height: 1.6;
  color: var(--plum-soft);
  text-wrap: pretty;
}

.whoami { margin: 0 0 1.4em; font-size: .88rem; color: var(--plum-soft); }
.whoami strong { color: var(--plum); font-weight: 600; word-break: break-all; }

.micro { margin: 1.4em 0 1.1em; font-size: .8rem; line-height: 1.5; color: var(--plum-soft); }

.status { margin: 1em 0 0; min-height: 1.3em; font-size: .84rem; line-height: 1.4; color: var(--plum-soft); }
.status.error { color: var(--rose-deep); font-weight: 500; }

/* ── buttons ───────────────────────────────────────────── */
.btn {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: var(--radius-pill);
  padding: .82em 1.9em;
  cursor: pointer;
  transition: transform .2s var(--ease-spring), box-shadow .2s, background .2s, opacity .3s, filter .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-yes {
  --grow: 1;
  transform: scale(var(--grow));
  color: var(--white);
  background: linear-gradient(140deg, var(--rose), var(--rose-deep));
  box-shadow: 0 8px 22px -6px rgba(185, 58, 91, .55);
  font-size: clamp(1rem, 4.2vw, 1.1rem);
}
.btn-yes:not(:disabled):hover { transform: translateY(-2px) scale(calc(var(--grow) * 1.04)); box-shadow: 0 14px 30px -8px rgba(185, 58, 91, .6); }
.btn-yes:not(:disabled):active { transform: translateY(0) scale(calc(var(--grow) * .98)); }

.btn-no {
  color: var(--plum-soft);
  background: var(--white);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: clamp(.95rem, 4vw, 1.05rem);
  touch-action: manipulation;
}

.btn-ghost {
  color: var(--plum-soft);
  background: transparent;
  border: 1.5px solid var(--line);
  font-size: .9rem;
  padding: .68em 1.5em;
}
.btn-ghost:hover { color: var(--rose-deep); border-color: var(--rose); }

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  color: var(--plum);
  background: var(--white);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-md);
  font-size: 1rem;
}
.btn-google:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.g-logo { width: 1.15em; height: 1.15em; flex: none; }

.btn-block { display: block; width: 100%; margin-block-start: .6em; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
  min-height: 3.6em;
}

/* the No button once it starts running away */
.btn-no.loose {
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  z-index: 30;
  transition: transform .28s var(--ease-spring), opacity .4s, filter .3s;
}
.btn-no.gone { opacity: 0; pointer-events: none; filter: blur(6px); }

.giveup {
  margin: 1.3em 0 0;
  font-size: .88rem;
  font-style: italic;
  color: var(--rose-deep);
  animation: screen-in .5s var(--ease-spring) both;
}

/* ── form ──────────────────────────────────────────────── */
#planForm { margin: 0; }

.field { border: 0; margin: 0 0 1.6em; padding: 0; }
.field-label {
  display: flex;
  align-items: center;
  gap: .5em;
  padding: 0;
  margin-block-end: .7em;
  font-size: .93rem;
  font-weight: 600;
  color: var(--plum);
}
.field-emoji { font-size: 1.05em; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; }

.chip {
  font: inherit;
  font-size: .89rem;
  font-weight: 500;
  color: var(--plum-soft);
  background: rgba(255, 255, 255, .85);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  padding: .6em 1.05em;
  cursor: pointer;
  transition: transform .18s var(--ease-spring), border-color .18s, background .18s, color .18s, box-shadow .18s;
  -webkit-tap-highlight-color: transparent;
}
.chip:hover { border-color: var(--rose); color: var(--rose-deep); transform: translateY(-1px); }
.chip:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; }
.chip[aria-pressed="true"] {
  color: var(--white);
  background: linear-gradient(140deg, var(--rose), var(--rose-deep));
  border-color: transparent;
  box-shadow: 0 6px 16px -5px rgba(185, 58, 91, .5);
}

.text-input {
  font: inherit;
  font-size: .95rem;
  color: var(--plum);
  width: 100%;
  padding: .7em .9em;
  background: rgba(255, 255, 255, .9);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  transition: border-color .18s, box-shadow .18s;
}
.text-input:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(225, 90, 120, .18);
}
textarea.text-input { resize: vertical; min-height: 3.2em; }
#locationOther { margin-block-start: 10px; }

.when-row { display: flex; flex-wrap: wrap; gap: 12px; }
.sub-field { flex: 1 1 140px; display: block; }
.sub-label {
  display: block;
  margin-block-end: .35em;
  font-size: .78rem;
  font-weight: 500;
  color: var(--plum-soft);
}

.quick-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 10px; }
.quick-picks .chip { font-size: .8rem; padding: .45em .85em; }

/* ── summary ───────────────────────────────────────────── */
.summary {
  margin: 0;
  padding: 1.1em 1.2em;
  text-align: start;
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.summary div { display: flex; gap: .7em; align-items: baseline; padding: .42em 0; }
.summary div + div { border-block-start: 1px solid var(--line); }
.summary dt { flex: none; font-size: .82rem; color: var(--plum-soft); }
.summary dd { margin: 0; font-size: .95rem; font-weight: 600; color: var(--plum); }

/* ── confetti ──────────────────────────────────────────── */
#confetti {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ── motion & small screens ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 380px) {
  .btn { padding: .78em 1.5em; }
  .btn-row { gap: 10px; }
}

/* ══════════════════════════════════════════════════════════
   admin.html only
   ══════════════════════════════════════════════════════════ */

.screen-list { place-items: start center; padding-block: clamp(28px, 8vh, 64px); }
.list-wrap { width: min(100%, 680px); }

.list-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-block-end: 1.6em;
}
.list-head .display { margin-block-end: .2em; }
.list-head .lede { margin: 0; }

.response {
  position: relative;
  margin-block-end: 14px;
  padding: 1.2em 1.4em;
  background: rgba(255, 255, 255, .84);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}
.response.latest { border-color: var(--rose); box-shadow: var(--shadow-lg); }

.response-badge {
  position: absolute;
  top: -9px;
  inset-inline-end: 16px;
  padding: .2em .7em;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--rose);
  border-radius: var(--radius-pill);
}

.response h2 {
  margin: 0 0 .5em;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--plum);
}
.response .meta {
  margin: 0 0 .9em;
  font-size: .78rem;
  color: var(--plum-soft);
}
.response .note {
  margin: .9em 0 0;
  padding: .7em .9em;
  font-size: .9rem;
  font-style: italic;
  color: var(--plum);
  background: rgba(255, 224, 230, .5);
  border-radius: 12px;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: .82rem;
  font-weight: 500;
  color: var(--plum-soft);
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: .35em .8em;
}

.empty {
  padding: 2.6em 1.4em;
  text-align: center;
  color: var(--plum-soft);
  background: rgba(255, 255, 255, .6);
  border: 1px dashed var(--line);
  border-radius: 18px;
}

/* ── upcoming / past sections ──────────────────────────── */
.response-section { margin-block-end: 1.8em; }
.section-head {
  margin: 0 0 .9em;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--plum-soft);
  padding-block-end: .5em;
  border-block-end: 1px solid var(--line);
}

/* ── per-card actions: calendar + delete ───────────────── */
.response-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-block-start: 1em;
  padding-block-start: .9em;
  border-block-start: 1px solid var(--line);
}

.btn-cal {
  font-size: .82rem;
  font-weight: 600;
  color: var(--rose-deep);
  text-decoration: none;
  background: rgba(255, 255, 255, .9);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  padding: .48em 1em;
  transition: border-color .18s, color .18s, transform .18s var(--ease-spring);
}
.btn-cal:hover { border-color: var(--rose); transform: translateY(-1px); }
.btn-cal:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; }

.btn-delete {
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--plum-soft);
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  padding: .48em 1em;
  margin-inline-start: auto; /* push delete to the far end */
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.btn-delete:hover { color: var(--rose-deep); border-color: var(--rose); }
.btn-delete:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; }
.btn-delete:disabled { opacity: .6; cursor: default; }
.btn-delete.armed {
  color: var(--white);
  background: var(--rose-deep);
  border-color: var(--rose-deep);
}
