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

:root {
  --bg: #0c0810;
  --rose: #ff5c8a;
  --rose-deep: #d43d6a;
  --rose-glow: rgba(255, 92, 138, 0.35);
  --rose-soft: rgba(255, 92, 138, 0.14);
  --gold: #f0c9b8;
  --text: #fff8fa;
  --muted: rgba(255, 248, 250, 0.58);
  --touch: 52px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(ellipse 120% 70% at 50% -15%, rgba(255, 92, 138, 0.16), transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(240, 201, 184, 0.07), transparent 40%),
    var(--bg);
  color: var(--text);
  height: 100%;
  min-height: 100svh;
  max-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom);
}

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

.wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 16px 0 20px;
  position: relative;
  z-index: 1;
  overflow-anchor: none;
}

.progress { display: flex; gap: 4px; margin-bottom: 24px; }
.progress-dot { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.08); transition: background 0.3s; }
.progress-dot.done { background: var(--rose); }
.progress-dot.current { background: var(--gold); box-shadow: 0 0 10px rgba(240,201,184,0.45); }

.badge {
  display: inline-block;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose);
  background: var(--rose-soft);
  padding: 6px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}

h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 8vw, 2.35rem);
  font-weight: 600;
  line-height: 1.12;
  margin-bottom: 8px;
}

.sub { font-size: 0.92rem; color: var(--muted); line-height: 1.55; margin-bottom: 20px; }

.step { display: none; }
.step.active { display: block; animation: fadeIn 0.4s var(--ease) both; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: linear-gradient(165deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  padding: 20px 16px;
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}

.card p.small { font-size: 0.8rem; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }

.ref-line {
  font-size: 0.72rem;
  color: rgba(255, 92, 138, 0.55);
  font-style: italic;
  margin-top: 12px;
  line-height: 1.4;
}

/* ── Knappar steg 1 ── */
.btn-arena { position: relative; min-height: 200px; margin-top: 6px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s var(--ease), box-shadow 0.2s;
}

.btn:active { transform: scale(0.97); }

.btn-yes {
  width: 100%;
  min-height: var(--touch);
  padding: 15px 22px;
  border-radius: 16px;
  font-size: 1.02rem;
  color: #fff;
  background: linear-gradient(145deg, var(--rose), var(--rose-deep));
  box-shadow: 0 10px 32px var(--rose-glow);
}

.btn-no {
  position: absolute;
  left: 50%;
  top: 74px;
  transform: translateX(-50%);
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  white-space: nowrap;
  z-index: 5;
}

.btn-no.run { transition: top 0.1s ease-out, left 0.1s ease-out; }
.btn-no.tiny { font-size: 0.7rem; padding: 7px 12px; opacity: 0.9; }

.no-hint { text-align: center; font-size: 0.76rem; font-style: italic; color: var(--rose); opacity: 0.7; margin-top: 10px; min-height: 1.2rem; }

.btn-next, .btn-modal, .btn-send {
  width: 100%;
  min-height: var(--touch);
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(145deg, var(--rose), var(--rose-deep));
  box-shadow: 0 8px 26px var(--rose-glow);
  margin-top: 6px;
}

.btn-send:disabled { opacity: 0.55; cursor: wait; }

.review-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.review-actions .btn-send { margin-top: 0; }

.btn-secondary {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  border-radius: 14px;
  font-size: 0.85rem;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ── Kalender ── */
.date-wrap { margin-bottom: 14px; }

input[type="date"] {
  width: 100%;
  min-height: var(--touch);
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 1.05rem;
  font-family: inherit;
  color-scheme: dark;
  -webkit-appearance: none;
  appearance: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85) sepia(0.4) saturate(4) hue-rotate(300deg);
  cursor: pointer;
  opacity: 0.9;
}

.date-preview {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--gold);
  min-height: 1.4rem;
  margin: 10px 0 14px;
}

label.field-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--gold);
}

.field-hint { font-size: 0.76rem; color: var(--muted); margin-bottom: 12px; line-height: 1.45; }

/* ── Val med ikoner ── */
.choice-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 6px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}

.choice-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  scroll-margin: 0;
  overflow-anchor: none;
  -webkit-tap-highlight-color: transparent;
}

.choice-opt:has(input:checked) {
  border-color: var(--rose);
  background: var(--rose-soft);
}

.choice-opt input {
  position: fixed;
  top: -100vh;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.opt-icon { font-size: 1.6rem; width: 36px; text-align: center; flex-shrink: 0; }
.opt-body { flex: 1; min-width: 0; }
.opt-title { font-size: 0.88rem; font-weight: 600; color: var(--text); display: block; }
.opt-desc { font-size: 0.72rem; color: var(--muted); margin-top: 2px; line-height: 1.35; display: block; }

.check-ring {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2); flex-shrink: 0;
}

.choice-opt:has(input:checked) .check-ring {
  border-color: var(--rose);
  background: var(--rose);
  box-shadow: inset 0 0 0 3px var(--bg);
}

/* ── Vibe ── */
.vibe-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.vibe-chip {
  padding: 10px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
}

.vibe-chip.selected {
  border-color: var(--rose);
  background: var(--rose-soft);
  color: #fff;
}

input[type="text"], textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  margin-bottom: 14px;
}

input[type="text"]::placeholder, textarea::placeholder { color: rgba(255,248,250,0.35); }
input[type="text"] { min-height: var(--touch); }
textarea { min-height: 80px; resize: vertical; }

input:focus, textarea:focus, input[type="date"]:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--rose-soft);
}

/* ── Sammanfattning ── */
.summary {
  text-align: left;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 14px 0 16px;
  padding: 14px;
  background: rgba(0,0,0,0.25);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
}

.summary-row { display: flex; gap: 10px; margin-bottom: 8px; align-items: flex-start; }
.summary-row:last-child { margin-bottom: 0; }
.summary-icon { font-size: 1.05rem; flex-shrink: 0; }
.summary-val { color: var(--text); }

/* ── Skicka-animation ── */
.send-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(8, 4, 10, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.send-overlay.show { opacity: 1; visibility: visible; }

.send-box { text-align: center; max-width: 300px; width: 100%; }

.send-rocket { font-size: 2.8rem; margin-bottom: 12px; animation: rocket 1s ease infinite; }

@keyframes rocket {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.send-status { font-size: 0.88rem; color: var(--text); margin-bottom: 16px; min-height: 2.5rem; line-height: 1.45; }

.send-bar-wrap { height: 6px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
.send-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--rose), var(--gold)); transition: width 0.3s ease; border-radius: 4px; }

.send-log { font-size: 0.72rem; color: var(--muted); text-align: left; line-height: 1.6; }

.send-log li { list-style: none; opacity: 0; transform: translateX(-8px); transition: opacity 0.3s, transform 0.3s; }
.send-log li.show { opacity: 1; transform: translateX(0); }

.center-step { text-align: center; }
.success-icon { font-size: 3rem; margin-bottom: 12px; }

.footer-note { text-align: center; font-size: 0.62rem; color: rgba(255,248,250,0.22); margin-top: 16px; padding-bottom: 4px; }

/* Toast & modal */
.toast {
  position: fixed;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(70px);
  max-width: min(360px, calc(100vw - 28px));
  padding: 13px 16px;
  background: rgba(22, 10, 18, 0.97);
  border: 1px solid rgba(255, 92, 138, 0.45);
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: center;
  z-index: 5000;
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s;
  pointer-events: none;
  color: var(--text);
}

.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }

.modal {
  background: linear-gradient(165deg, #1c1018, #0c0810);
  border: 1px solid rgba(255, 92, 138, 0.3);
  border-radius: 22px;
  padding: 26px 20px;
  max-width: 320px;
  width: 100%;
  text-align: center;
}

.modal-emoji { font-size: 2.2rem; margin-bottom: 10px; }
.modal h2 { font-family: 'Playfair Display', serif; font-size: 1.25rem; margin-bottom: 8px; color: var(--text); }
.modal p { color: var(--muted); font-size: 0.88rem; line-height: 1.5; margin-bottom: 18px; }
