/* Hogely UI — enhanced modern design system:
   glass morphism, layered animations, improved contrast, Motion-ready */

:root {
  /* Primary colors */
  --purple: #7C3AED;
  --purple-2: #A855F7;
  --purple-dark: #6D28D9;
  --purple-light: #EDE9FE;
  --stroke: #33175E;
  --pink: #FF7BC1;
  --pink-light: #FEE2E8;

  /* Semantic colors */
  --ink: #2D2D4E;
  --ink-strong: #0F0A1E;
  --muted: #6B7280;
  --muted-2: #9CA3AF;
  --muted-3: #D1D5DB;

  /* Backgrounds */
  --field-bg: #F9F7FF;
  --field-border: #EDE8FF;
  --soft: #F3EEFF;
  --white: #ffffff;
  --overlay-light: rgba(255, 255, 255, 0.7);

  /* Status colors */
  --green: #25D366;
  --error: #EF4444;
  --warning: #F59E0B;

  /* Gradients */
  --grad: linear-gradient(135deg, #A855F7, #7C3AED);
  --grad-pink: linear-gradient(135deg, #FF7BC1, #FF5BA3);
  --grad-warm: linear-gradient(135deg, #F97316, #FB923C);

  /* Shadows */
  --shadow-btn: 0 6px 22px rgba(124, 58, 237, .35);
  --shadow-card: 0 10px 40px rgba(0, 0, 0, .08), 0 2px 10px rgba(0, 0, 0, .04);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .12);
  --shadow-glass: 0 8px 32px rgba(31, 38, 135, 0.15);

  /* Radii */
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

html, body {
  overflow-x: hidden;
}

body {
  background: linear-gradient(180deg, #EAE4FF 0%, #F5F2FF 55%, #FDFCFF 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.65;
  min-height: 100vh;
  font-size: 1rem;
}

.wrap {
  max-width: 430px;
  margin: 0 auto;
  padding: 16px 22px;
  padding-bottom: 160px;
  position: relative;
  background: var(--white);
  min-height: 100vh;
  animation: pageIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.hidden { display: none !important; }

/* ---------- topbar (removed) ---------- */

/* ---------- typography ---------- */

h1 {
  font-family: 'Fredoka', 'Poppins', sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .5px;
  color: #fff;
  paint-order: stroke fill;
  -webkit-text-stroke: 6px var(--stroke);
  text-shadow: 0 3px 0 var(--stroke), 0 6px 14px rgba(51, 23, 94, .35);
  margin-bottom: 10px;
}
h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-strong);
  margin-bottom: 12px;
}
.sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; font-weight: 400; }
.grad-text {
  color: var(--pink);
  paint-order: stroke fill;
  -webkit-text-stroke: 6px var(--stroke);
  background: none;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: 50px;
  background: var(--field-bg);
  color: var(--ink);
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.btn:hover {
  transform: translateY(-3px);
  background: var(--purple-light);
}

.btn:active {
  transform: translateY(-1px) scale(0.99);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-btn);
  position: relative;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
}

.btn-primary:hover {
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.5);
  transform: translateY(-4px);
}

.btn-primary:hover::before {
  transform: translateX(100%);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: shine 2.8s ease infinite;
}

@keyframes shine {
  0% { left: -60%; }
  60%, 100% { left: 130%; }
}

.btn-big {
  padding: 17px 24px;
  font-size: 17px;
}

.btn-small {
  width: auto;
  padding: 12px 20px;
  font-size: 14px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-small::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-small:active::before {
  width: 300px;
  height: 300px;
}

.btn-ghost {
  background: transparent;
  border: 2px solid var(--field-border);
  color: var(--muted);
  transition: all var(--transition-fast);
}

.btn-ghost:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: var(--purple-light);
}

.btn-whatsapp {
  background: var(--green);
  color: #fff;
  font-size: 18px;
  padding: 18px 24px;
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.4);
  transition: all var(--transition-base);
}

.btn-whatsapp:hover {
  box-shadow: 0 12px 36px rgba(37, 211, 102, 0.5);
  transform: translateY(-4px);
}

.btn-insta {
  background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af);
  color: #fff;
  flex-direction: column;
  gap: 2px;
  transition: all var(--transition-base);
}

.btn-insta:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(249, 115, 22, 0.4);
}

.btn-insta small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  opacity: 0.9;
}

.btn-telegram {
  background: #229ed9;
  color: #fff;
  transition: all var(--transition-base);
}

.btn-telegram:hover {
  box-shadow: 0 8px 28px rgba(34, 158, 217, 0.4);
  transform: translateY(-4px);
}

.btn-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 22px;
  margin-top: 20px;
  background: var(--white);
  border-top: 1px solid var(--field-border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  animation: slideUpIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-row .btn {
  flex: 1;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
}

.btn-row .btn-ghost {
  flex: 0 0 35%;
  padding: 14px 16px;
  font-size: 14px;
}

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

/* ---------- forms ---------- */

input[type="text"], .select-big {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius);
  background: var(--field-bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

input[type="text"]:focus, .select-big:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15), 0 0 0 1px var(--purple);
  background: var(--white);
  transform: translateY(-1px);
}

input::placeholder {
  color: #C4B5FD;
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.select-big {
  appearance: none;
  margin-bottom: 20px;
  font-weight: 600;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237C3AED' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.field-error {
  color: var(--error);
  font-size: 14px;
  font-weight: 600;
  margin: 10px 0;
  animation: shake .3s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ---------- homepage ---------- */

.hero {
  text-align: center;
  padding: 24px 0 38px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 32px;
  animation: slideDown 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation-delay: 0.1s;
  animation-fill-mode: backwards;
}

.hero .sub {
  font-size: 15px;
  margin: 14px auto 28px;
  max-width: 320px;
  animation: slideDown 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation-delay: 0.2s;
  animation-fill-mode: backwards;
  color: var(--muted);
  line-height: 1.6;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cta-main {
  animation: btnShake 3.4s ease-in-out 1.8s infinite;
}

@keyframes btnShake {
  0%, 82%, 100% {
    transform: translateX(0) rotate(0) translateY(0);
  }
  84% {
    transform: translateX(-4px) rotate(-1deg) translateY(-2px);
  }
  86% {
    transform: translateX(4px) rotate(1deg) translateY(-2px);
  }
  88% {
    transform: translateX(-4px) rotate(-1deg) translateY(-2px);
  }
  90% {
    transform: translateX(4px) rotate(1deg) translateY(-2px);
  }
  92% {
    transform: translateX(-2px) rotate(-0.6deg) translateY(0);
  }
  94% {
    transform: translateX(2px) rotate(0.6deg) translateY(0);
  }
  96% {
    transform: translateX(0) rotate(0) translateY(0);
  }
}

.steps-explainer {
  display: grid;
  gap: 12px;
  margin-bottom: 34px;
}

.explain-card {
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  cursor: pointer;
}

.explain-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  background: var(--white);
  border-color: var(--purple-light);
}

.explain-emoji {
  font-size: 32px;
  margin-bottom: 12px;
  animation: floatY 3.2s ease-in-out infinite;
  width: fit-content;
  display: inline-block;
}

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

.explain-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-strong);
  margin-bottom: 6px;
}

.explain-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.teasers {
  margin-bottom: 34px;
}

.teaser-card {
  background: var(--white);
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  display: flex;
  gap: 12px;
  align-items: center;
  transition: all var(--transition-base);
  cursor: pointer;
}

.teaser-card:hover {
  border-color: var(--purple);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.2);
  transform: translateY(-2px);
  background: var(--purple-light);
}

.teaser-emoji {
  font-size: 24px;
  flex-shrink: 0;
}

.hero-bottom { margin-bottom: 30px; }

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 22px 0 8px;
  border-top: 1px solid var(--soft);
  margin-top: 10px;
}
.site-footer a { color: var(--purple-dark); text-decoration: none; font-weight: 500; }
.site-footer a:hover { color: var(--purple); }
.foot-brand { margin-top: 10px; font-size: 12px; color: var(--muted-2); }

.static-page h1 { margin-bottom: 16px; }
.static-page h2 { margin-top: 22px; }
.static-page p, .static-page li { color: #4B5563; font-size: 15px; margin-bottom: 10px; }
.static-page ul { padding-left: 20px; }
.static-page .btn { width: auto; margin-top: 8px; }

/* ---------- create wizard ---------- */

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.progress-steps .dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted-2);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 2px solid transparent;
}

.progress-steps .dot.active {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.progress-steps .line {
  width: 40px;
  height: 4px;
  background: var(--soft);
  border-radius: 2px;
  transition: background var(--transition-base);
}

.step {
  animation: fadeUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.name-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  animation: fadeUp .4s ease .15s backwards;
}
.name-input-row input {
  flex: 1;
  transition: all .3s ease;
}
.name-input-row input:focus {
  transform: translateY(-2px);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  min-height: 10px;
}
.chip {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(124, 58, 237, 0.1) 100%);
  border: 2px solid rgba(124, 58, 237, 0.3);
  color: var(--purple);
  border-radius: 999px;
  padding: 10px 14px 10px 16px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all var(--transition-base);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.12);
}

.chip:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(124, 58, 237, 0.2) 100%);
  border-color: rgba(124, 58, 237, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
}

@keyframes popIn {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.chip-x {
  background: rgba(124, 58, 237, 0.2);
  border: none;
  color: var(--purple);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.chip-x:hover {
  background: var(--purple);
  color: #fff;
  transform: rotate(90deg);
}

.check-row { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); margin-bottom: 12px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; accent-color: var(--purple); }
#my-name { margin-bottom: 14px; }

.cat-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  background: var(--soft);
  border-radius: var(--radius);
  padding: 6px;
  margin-bottom: 18px;
  -webkit-overflow-scrolling: touch;
  /* stay reachable while scrolling the long question list */
  position: sticky;
  top: 8px;
  z-index: 20;
  box-shadow: 0 4px 18px rgba(124, 58, 237, .12);
}

.cat-tab {
  flex: 1 0 auto;
  background: none;
  border: 2px solid transparent;
  color: var(--muted);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.cat-tab:hover {
  color: var(--purple-2);
  background: rgba(124, 58, 237, 0.08);
}

.cat-tab.active {
  background: var(--white);
  color: var(--purple);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
  border-color: var(--purple-light);
  transform: translateY(-2px);
}

.q-list { display: grid; gap: 12px; margin-bottom: 20px; }
.q-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 2px solid var(--field-border);
  border-radius: 18px;
  padding: 14px 44px 14px 14px;
  text-align: left;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition-base), background var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
  opacity: 0;
  transform: translateY(8px);
  animation: qCardIn .35s ease forwards;
}
@keyframes qCardIn {
  to { opacity: 1; transform: translateY(0); }
}
.q-list .q-card:nth-child(1) { animation-delay: .02s; }
.q-list .q-card:nth-child(2) { animation-delay: .06s; }
.q-list .q-card:nth-child(3) { animation-delay: .10s; }
.q-list .q-card:nth-child(4) { animation-delay: .14s; }
.q-list .q-card:nth-child(5) { animation-delay: .18s; }
.q-list .q-card:nth-child(n+6) { animation-delay: .2s; }

.q-card:hover {
  border-color: var(--purple-2);
  transform: translateX(6px);
  background: var(--purple-light);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.15);
}

.q-card:active {
  transform: translateX(6px) scale(0.98);
}

.q-card .q-emoji {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  font-size: 21px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--soft), var(--purple-light));
  transition: transform var(--transition-base), background var(--transition-base);
}

.q-card .q-text {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
}

.q-card .q-check {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%) scale(0);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-base);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.q-card.selected {
  border-color: var(--purple);
  background: var(--field-bg);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.25);
}

.q-card.selected .q-emoji {
  background: var(--grad);
  transform: scale(1.08) rotate(-6deg);
}

.q-card.selected .q-check {
  transform: translateY(-50%) scale(1);
}

.custom-q { margin: 6px 0 18px; }
.custom-q label { display: block; font-size: 14px; font-weight: 600; color: var(--purple); margin-bottom: 8px; }

.summary-box {
  background: var(--field-bg);
  border: 1.5px dashed rgba(124, 58, 237, .3);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--ink);
}
.summary-box p { margin-bottom: 6px; }

/* ---------- share page ---------- */

.share-hero {
  text-align: center;
  padding: 32px 0 28px;
  background: linear-gradient(135deg, rgba(168, 85, 247, .08) 0%, rgba(124, 58, 237, .05) 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  animation: fadeUp .5s ease;
}
.big-emoji {
  font-size: 64px;
  margin-bottom: 16px;
  animation: bounceIn .6s cubic-bezier(.34, 1.56, .64, 1);
  display: block;
}
@keyframes bounceIn {
  from { transform: scale(.2); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.share-hero h1 {
  font-size: 32px;
  margin-bottom: 12px;
}
.share-hero .sub {
  margin: 0;
  max-width: 280px;
  margin: 0 auto;
}

.link-box {
  display: flex;
  gap: 10px;
  margin: 26px 0;
  align-items: stretch;
  background: var(--field-bg);
  padding: 12px;
  border-radius: var(--radius);
  border: 1.5px solid var(--field-border);
  transition: all .3s ease;
}
.link-box:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .1);
}
.link-box input {
  flex: 1;
  font-size: 12px;
  color: var(--purple);
  font-weight: 700;
  border: none;
  background: transparent;
  font-family: 'Courier New', monospace;
  letter-spacing: .5px;
}
.link-box input::selection { background: rgba(124, 58, 237, .2); }
.link-box .btn-small {
  padding: 10px 16px;
  font-size: 13px;
  flex-shrink: 0;
}

.share-buttons {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
  animation: fadeUp .5s ease .1s backwards;
}
.btn-whatsapp {
  box-shadow: 0 8px 24px rgba(37, 211, 102, .28);
  transition: all .3s cubic-bezier(.34, 1.56, .64, 1);
}
.btn-whatsapp:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(37, 211, 102, .36);
}
.btn-whatsapp:active {
  transform: translateY(-2px);
}
.results-link { display: flex; margin-top: 6px; }

/* ---------- how-it-works instructions (share page) ---------- */

.instructions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  animation: fadeUp .5s ease .15s backwards;
}

.instruction-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--field-bg);
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}

.instruction-number {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(124, 58, 237, .3);
}

.instruction-text {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  padding-top: 3px;
}
.instruction-text strong { color: var(--purple-dark); }

/* confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.confetti i {
  position: absolute; top: -12px;
  width: 9px; height: 14px;
  opacity: .9;
  animation: fall 3.4s linear forwards;
}
.confetti i:nth-child(4n+1) { background: var(--pink); }
.confetti i:nth-child(4n+2) { background: var(--purple-2); border-radius: 50%; }
.confetti i:nth-child(4n+3) { background: #448aff; }
.confetti i:nth-child(4n+4) { background: #ffd93d; border-radius: 50%; }
@keyframes fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}
.confetti i:nth-child(1) { left: 3%; animation-delay: 0s; } .confetti i:nth-child(2) { left: 8%; animation-delay: .3s; }
.confetti i:nth-child(3) { left: 13%; animation-delay: .1s; } .confetti i:nth-child(4) { left: 18%; animation-delay: .5s; }
.confetti i:nth-child(5) { left: 23%; animation-delay: .2s; } .confetti i:nth-child(6) { left: 28%; animation-delay: .6s; }
.confetti i:nth-child(7) { left: 33%; animation-delay: .05s; } .confetti i:nth-child(8) { left: 38%; animation-delay: .4s; }
.confetti i:nth-child(9) { left: 43%; animation-delay: .25s; } .confetti i:nth-child(10) { left: 48%; animation-delay: .55s; }
.confetti i:nth-child(11) { left: 53%; animation-delay: .15s; } .confetti i:nth-child(12) { left: 58%; animation-delay: .45s; }
.confetti i:nth-child(13) { left: 63%; animation-delay: .35s; } .confetti i:nth-child(14) { left: 68%; animation-delay: .05s; }
.confetti i:nth-child(15) { left: 73%; animation-delay: .5s; } .confetti i:nth-child(16) { left: 78%; animation-delay: .2s; }
.confetti i:nth-child(17) { left: 83%; animation-delay: .6s; } .confetti i:nth-child(18) { left: 88%; animation-delay: .1s; }
.confetti i:nth-child(19) { left: 93%; animation-delay: .4s; } .confetti i:nth-child(20) { left: 97%; animation-delay: .3s; }
.confetti i:nth-child(21) { left: 15%; animation-delay: .7s; } .confetti i:nth-child(22) { left: 40%; animation-delay: .8s; }
.confetti i:nth-child(23) { left: 65%; animation-delay: .75s; } .confetti i:nth-child(24) { left: 90%; animation-delay: .85s; }

/* ---------- voting page ---------- */

#vote-landing { text-align: center; padding-top: 16px; }
#vote-landing input { margin: 6px 0 22px; text-align: center; }
#vote-landing .input-label { text-align: left; }

.vote-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.back-btn {
  background: var(--soft); border: none; color: var(--purple);
  width: 40px; height: 40px; border-radius: 12px;
  font-size: 16px; cursor: pointer; flex-shrink: 0;
  transition: background .2s;
}
.back-btn:hover { background: var(--field-border); }
.bar-track { flex: 1; height: 8px; background: var(--soft); border-radius: 10px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--grad); border-radius: 10px; transition: width .5s ease; }
.progress-label { font-size: 13px; font-weight: 700; color: var(--muted); flex-shrink: 0; }

.q-screen.slide-in { animation: slideIn .28s ease; }
.q-screen.slide-back { animation: slideBack .28s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideBack { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }

/* question shown as a purple gradient card, like bestfriendgame */
.q-title-card {
  text-align: center;
  padding: 32px 20px 28px;
  background: linear-gradient(135deg, #9C7B5C 0%, #7A5C42 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  animation: slideDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 28px rgba(122, 92, 66, .35);
}

.q-title {
  font-family: 'Fredoka', 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .3px;
  color: #fff;
  paint-order: stroke fill;
  -webkit-text-stroke: 5px #3E2B1F;
  text-shadow: 0 3px 0 #3E2B1F, 0 6px 14px rgba(62, 43, 31, .35);
  margin: 0;
}

.people-btns { display: flex; flex-direction: column; gap: 12px; }
.person-btn {
  background: var(--white);
  border: 2px solid var(--field-border);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  padding: 17px 20px;
  justify-content: flex-start;
  text-align: left;
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInOption 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.person-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
}

.people-btns .person-btn:nth-child(1) { animation-delay: 0.05s; }
.people-btns .person-btn:nth-child(2) { animation-delay: 0.12s; }
.people-btns .person-btn:nth-child(3) { animation-delay: 0.19s; }
.people-btns .person-btn:nth-child(4) { animation-delay: 0.26s; }
.people-btns .person-btn:nth-child(5) { animation-delay: 0.33s; }
.people-btns .person-btn:nth-child(6) { animation-delay: 0.40s; }
.people-btns .person-btn:nth-child(7) { animation-delay: 0.47s; }
.people-btns .person-btn:nth-child(8) { animation-delay: 0.54s; }
.people-btns .person-btn:nth-child(9) { animation-delay: 0.61s; }
.people-btns .person-btn:nth-child(10) { animation-delay: 0.68s; }

@keyframes slideInOption {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.person-btn:hover {
  border-color: var(--purple);
  background: var(--purple-light);
  transform: translateX(8px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.15);
}

.person-btn:hover::before {
  transform: translateX(100%);
}

.person-btn.selected {
  border-color: var(--purple);
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.4);
  transform: translateX(0) scale(1.02);
}

#vote-done { text-align: center; padding-top: 40px; }
#vote-done .btn { margin-top: 10px; }
#done-hero { text-align: center; padding-top: 40px; }
#done-hero .btn { margin-top: 10px; }
.submit-status {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin: 4px 0 18px;
}

/* ---------- results page ---------- */

.results-header { margin-bottom: 18px; }

.results-header-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 18px 18px;
  overflow: hidden;
  animation: fadeUp .4s ease;
}
.results-header-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--grad);
}

.results-header h1 {
  font-size: 21px;
  -webkit-text-stroke: 5px var(--stroke);
  margin: 8px 0 8px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  color: #DC2626;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  padding: 5px 12px;
  border-radius: 999px;
}

.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, .6);
  animation: pulseDot 1.6s ease-out infinite;
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); }
  70%  { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.voter-pill {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--purple-dark);
  background: var(--purple-light);
  padding: 4px 12px;
  border-radius: 999px;
}

.countdown { font-weight: 600; color: #F59E0B; margin-left: 6px; }

.rank-card {
  background: var(--white);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 18px;
  margin-bottom: 16px;
  animation: fadeUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all var(--transition-base);
}

.rank-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--purple-light);
}

.rank-q {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-strong);
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(124, 58, 237, 0.05));
  padding: 12px;
  border-radius: var(--radius);
}

.rank-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  transition: transform var(--transition-fast);
}

.rank-row:hover {
  transform: translateX(4px);
}

.rank-medal {
  font-size: 24px;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
  animation: bounce 0.6s ease-in-out infinite;
}

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

.rank-row.other .rank-medal {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  width: 26px;
  height: 26px;
  line-height: 26px;
  border-radius: 50%;
  background: var(--soft);
  animation: none;
}

.rank-info {
  flex: 1;
  min-width: 0;
}

.rank-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.rank-name em {
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  display: block;
}

.rank-bar {
  height: 12px;
  background: var(--soft);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.rank-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 10px;
  background: var(--grad);
  transition: width 0.8s cubic-bezier(0.25, 0.8, 0.3, 1);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.rank-row.top1 .rank-bar-fill {
  background: linear-gradient(135deg, #ffd700, #ffb300);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.rank-row.top2 .rank-bar-fill {
  opacity: 0.85;
}

.rank-row.top3 .rank-bar-fill {
  opacity: 0.65;
}

.rank-row.other .rank-bar-fill {
  opacity: 0.5;
}
.share-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.btn-share-card {
  flex: 1;
  font-size: 14px;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(37, 211, 102, .25);
}
.btn-share-img {
  flex: 0 0 auto;
  width: 46px;
  padding: 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skeleton-card {
  height: 180px;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  background: linear-gradient(100deg, var(--soft) 40%, var(--field-bg) 50%, var(--soft) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -80% 0; } }

.podium {
  background: var(--white);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px 14px;
  margin-bottom: 18px;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.podium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad);
}

.podium h2 {
  margin-bottom: 20px;
  font-size: 18px;
}

.podium-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
}

.podium-spot {
  background: var(--field-bg);
  border: 2px solid var(--field-border);
  border-radius: var(--radius);
  padding: 12px 8px;
  flex: 1;
  transition: all var(--transition-base);
  position: relative;
}

.podium-spot:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.podium-spot.p1 {
  order: 2;
  padding-top: 28px;
  background: linear-gradient(160deg, #FFF7DF, #FDF3FF);
  border-color: #ffd70080;
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.2);
  transform: scale(1.08);
}

.podium-spot.p1::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid #ffd700;
}

.podium-spot.p2 {
  order: 1;
  opacity: 0.9;
}

.podium-spot.p3 {
  order: 3;
  opacity: 0.85;
}

.podium-medal {
  font-size: 36px;
  animation: bounce 0.6s ease-in-out infinite;
}

.podium-spot.p2 .podium-medal {
  animation-delay: 0.1s;
}

.podium-spot.p3 .podium-medal {
  animation-delay: 0.2s;
}

.podium-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-strong);
  margin-top: 8px;
  word-break: break-word;
  line-height: 1.4;
}

.podium-wins {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 600;
}

/* ---------- bottom nav (fixed at bottom, content scrolls) ---------- */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid #F0EAFF;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 12px 0 max(14px, env(safe-area-inset-bottom));
  z-index: 9999;
  box-shadow: 0 -8px 40px rgba(109, 40, 217, 0.15);
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 22px;
  border-radius: 16px;
  transition: all var(--transition-base);
  font-family: 'Poppins', sans-serif;
  color: #C4B5FD;
  font-size: 0.75rem;
  font-weight: 600;
  position: relative;
  text-decoration: none;
}

.nav-btn:hover {
  background: var(--purple-light);
}

.nav-btn svg {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-fast);
  stroke: #C4B5FD;
}

.nav-btn.active {
  color: var(--purple);
}

.nav-btn.active svg {
  stroke: var(--purple);
  transform: scale(1.15);
}

.nav-btn:not(.active) svg {
  stroke: #C4B5FD;
}

.nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--grad);
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}
@media (max-width: 375px) {
  .nav-btn { padding: 8px 14px; }
}

/* ---------- wizard action bar (create page): Back/Next fixed at bottom ---------- */

.wizard-bar {
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px max(14px, env(safe-area-inset-bottom));
}
.wizard-bar .btn { width: auto; }
.wizard-bar .wiz-home {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--purple);
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.wizard-bar .wiz-home:hover { background: var(--field-border); }
.wizard-bar .wiz-home:active { transform: scale(.94); }
.wizard-bar .wiz-home svg { width: 24px; height: 24px; }
.wizard-bar .wiz-back {
  flex: 0 0 auto;
  padding: 13px 20px;
  white-space: nowrap;
}
.wizard-bar .wiz-next {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- profile tab (share page) ---------- */

.view-panel { animation: fadeUp .4s ease; }

.profile-card {
  background: var(--white);
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 22px 18px;
  margin-bottom: 18px;
  text-align: left;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left var(--transition-slow);
}

.profile-card:hover {
  border-color: var(--purple-2);
  box-shadow: 0 12px 48px rgba(124, 58, 237, 0.2);
  transform: translateY(-4px);
}

.profile-card:hover::before {
  left: 100%;
}

.profile-card h2 {
  font-size: 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-strong);
}

.q-list-profile {
  margin: 0 0 18px 0;
  padding: 0;
  list-style: none;
}
.q-list-profile li {
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 10px;
  padding-left: 28px;
  position: relative;
  line-height: 1.5;
  animation: fadeUp .4s ease backwards;
}
.q-list-profile li:nth-child(1) { animation-delay: .05s; }
.q-list-profile li:nth-child(2) { animation-delay: .1s; }
.q-list-profile li:nth-child(3) { animation-delay: .15s; }
.q-list-profile li:nth-child(4) { animation-delay: .2s; }
.q-list-profile li:nth-child(5) { animation-delay: .25s; }
.q-list-profile li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--purple);
  font-weight: 700;
  font-size: 16px;
}

.sugg-label {
  margin: 20px 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-strong);
}
.sugg-chip {
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all .3s cubic-bezier(.34, 1.56, .64, 1);
  border-color: rgba(124, 58, 237, .3);
}
.sugg-chip:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, .18) 0%, rgba(124, 58, 237, .14) 100%);
  border-color: var(--purple);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, .2);
}
.sugg-chip:active {
  transform: translateY(-1px);
}
.sugg-chip:disabled {
  opacity: .5;
  cursor: default;
}

.btn-logout {
  background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 100%);
  color: #E11D48;
  border: 2px solid #FECDD3;
  margin-top: 16px;
  box-shadow: 0 4px 16px rgba(225, 29, 72, .15);
  transition: all .3s ease;
}
.btn-logout:hover {
  background: linear-gradient(135deg, #FFE4E6 0%, #FFD4DB 100%);
  border-color: #FB7185;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(225, 29, 72, .25);
}

/* ---------- ad slots ---------- */

.ad-native:empty { display: none; }
.ad-native { margin-bottom: 16px; border-radius: var(--radius-lg); overflow: hidden; }
#push-slot:empty { display: none; }

/* ---------- desktop: floating phone card, like bestfriendgame ---------- */

@media (min-width: 600px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
  }

  .wrap {
    width: 100%;
    min-height: min(900px, calc(100vh - 64px));
    max-height: calc(100vh - 64px);
    border-radius: 40px;
    box-shadow: 0 50px 120px rgba(79, 70, 229, 0.35), 0 15px 40px rgba(109, 40, 217, 0.2);
    overflow: visible;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    animation: scaleIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  @keyframes scaleIn {
    from {
      opacity: 0;
      transform: scale(0.95) translateY(20px);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }

  .wrap::-webkit-scrollbar {
    width: 10px;
  }

  .wrap::-webkit-scrollbar-track {
    background: transparent;
  }

  .wrap::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.35);
    border-radius: 8px;
  }

  .wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.5);
  }
}

@media (min-width: 1000px) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
      radial-gradient(circle at 18% 22%, rgba(168, 85, 247, .14), transparent 42%),
      radial-gradient(circle at 82% 78%, rgba(79, 70, 229, .14), transparent 42%);
    pointer-events: none;
    z-index: 0;
  }
  .wrap { position: relative; z-index: 1; }
}

/* ========== MOBILE FRIENDLY IMPROVEMENTS ========== */

@media (max-width: 768px) {
  .wrap {
    max-width: 100%;
    padding: 12px 16px;
    padding-bottom: 140px;
    border-radius: 0;
  }

  .bottom-nav {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
  }

  .step {
    animation: fadeUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding-bottom: 20px;
  }

  h1 {
    font-size: 24px !important;
  }

  h2 {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .btn-row {
    width: calc(100% + 32px);
    left: -16px;
    transform: none;
    max-width: none;
    border-radius: 0;
    padding: 12px 16px;
    gap: 8px;
  }

  .btn-row .btn {
    padding: 14px 12px;
    font-size: 14px;
  }

  .btn-row .btn-ghost {
    flex: 0 0 40%;
  }

  .btn-row .btn-primary {
    flex: 1;
  }

  .progress-steps {
    margin-bottom: 20px;
  }

  .progress-steps .dot {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .progress-steps .line {
    width: 30px;
  }

  .cat-tabs {
    gap: 4px;
    margin-bottom: 12px;
    padding: 3px;
  }

  .cat-tab {
    padding: 8px 12px;
    font-size: 12px;
  }

  .q-card {
    padding: 12px 36px 12px 14px;
    margin-bottom: 8px;
  }

  .q-text {
    font-size: 13px !important;
  }

  .chip {
    padding: 8px 12px 8px 14px;
    font-size: 13px;
    margin-bottom: 6px;
  }

  .name-input-row {
    gap: 8px;
    margin-bottom: 14px;
  }

  .name-input-row input {
    font-size: 14px;
    padding: 12px 14px;
  }

  input[type="text"], .select-big {
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 10px;
  }

  .check-row {
    gap: 8px;
    font-size: 14px;
    margin-bottom: 12px;
  }

  .custom-q {
    margin: 4px 0 14px;
  }

  .custom-q label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .custom-q input {
    font-size: 14px;
    padding: 12px;
  }

  .summary-box {
    padding: 12px;
    font-size: 13px;
    margin-bottom: 14px;
  }

  .summary-box p {
    margin-bottom: 4px;
  }

  .field-error {
    font-size: 12px;
    margin: 8px 0;
  }
}

/* ========== DESKTOP FRIENDLY ========== */

@media (min-width: 769px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    min-height: 100vh;
  }

  .wrap {
    width: 100%;
    max-width: 550px;
    min-height: auto;
    padding: 40px 48px;
    padding-bottom: 60px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12),
                0 8px 24px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .step {
    animation: fadeUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  h1 {
    font-size: 32px !important;
    margin-bottom: 12px;
  }

  h2 {
    font-size: 20px;
    margin-bottom: 18px;
  }

  .sub {
    font-size: 16px;
    margin-bottom: 32px;
    max-width: 100%;
  }

  .progress-steps {
    margin-bottom: 40px;
    gap: 12px;
  }

  .progress-steps .dot {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .progress-steps .line {
    width: 48px;
    height: 4px;
  }

  .name-input-row {
    gap: 12px;
    margin-bottom: 24px;
  }

  .name-input-row input {
    font-size: 16px;
    padding: 14px 18px;
    border-radius: 12px;
  }

  .chips {
    gap: 12px;
    margin-bottom: 24px;
  }

  .chip {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 24px;
  }

  .check-row {
    font-size: 16px;
    margin-bottom: 16px;
    gap: 10px;
  }

  input[type="text"], .select-big {
    padding: 14px 18px;
    font-size: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
  }

  .input-label {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .cat-tabs {
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px;
  }

  .cat-tab {
    padding: 12px 18px;
    font-size: 14px;
    border-radius: 12px;
  }

  .q-list {
    gap: 12px;
    margin-bottom: 24px;
  }

  .q-card {
    padding: 16px 48px 16px 18px;
    margin-bottom: 0;
    font-size: 15px;
    border-radius: 12px;
    transition: all var(--transition-base);
  }

  .q-card:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
  }

  .q-text {
    font-size: 15px !important;
  }

  .custom-q {
    margin: 0 0 24px;
  }

  .custom-q label {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .custom-q input {
    font-size: 16px;
    padding: 14px 18px;
    border-radius: 12px;
  }

  .summary-box {
    padding: 20px;
    font-size: 15px;
    margin-bottom: 24px;
    border-radius: 12px;
  }

  .summary-box p {
    margin-bottom: 8px;
  }

  .field-error {
    font-size: 14px;
    margin: 12px 0;
  }

  .btn-row {
    width: 100%;
    padding: 20px 0;
    margin-top: 28px;
    gap: 14px;
    background: transparent;
    border-top: none;
    box-shadow: none;
  }

  .btn-row .btn {
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
  }

  .btn-row .btn-ghost {
    flex: 0 0 auto;
    padding: 14px 24px;
    width: auto;
  }

  .btn-row .btn-primary {
    flex: 1;
  }

  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 550px;
    border-radius: 0;
    padding: 16px 0 max(16px, env(safe-area-inset-bottom));
  }

  .nav-btn {
    padding: 12px 24px;
    font-size: 0.85rem;
  }

  .nav-btn svg {
    width: 26px;
    height: 26px;
  }
}

/* Large Desktop */
@media (min-width: 1024px) {
  .wrap {
    max-width: 600px;
    padding: 48px 56px;
    border-radius: 28px;
  }

  h1 {
    font-size: 36px !important;
  }

  h2 {
    font-size: 22px;
  }

  .sub {
    font-size: 17px;
  }

  .progress-steps .dot {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .btn-row .btn {
    padding: 16px 28px;
    font-size: 17px;
  }
}

/* Extra small devices */
@media (max-width: 375px) {
  .wrap {
    padding: 10px 12px;
    padding-bottom: 160px;
  }

  .btn-row {
    width: calc(100% + 24px);
    left: -12px;
    padding: 10px 12px;
    gap: 6px;
  }

  .btn-row .btn {
    padding: 12px 10px;
    font-size: 13px;
  }

  h1 {
    font-size: 22px !important;
  }

  .sub {
    font-size: 13px;
  }

  .progress-steps {
    gap: 4px;
  }

  .progress-steps .dot {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .progress-steps .line {
    width: 24px;
  }

  .q-card {
    padding: 10px 32px 10px 12px;
  }

  .chip {
    font-size: 12px;
    padding: 6px 10px 6px 12px;
  }
}
