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

:root {
  --bg: #0D0E18;
  --surface: rgba(255,255,255,0.057);
  --primary: #F2F2F7;
  --secondary: rgba(242,242,247,0.48);
  --muted: rgba(242,242,247,0.28);
  --accent: #3D9BFF;
  --border: rgba(255,255,255,0.09);
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow: 0 8px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.07);
  --shadow-sm: 0 2px 16px rgba(0,0,0,0.4);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 60% at 15% 10%, rgba(61,155,255,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 65% 50% at 88% 88%, rgba(150,61,255,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 45% 35% at 68% 22%, rgba(255,61,150,0.08) 0%, transparent 55%);
  color: var(--primary);
  min-height: 100vh;
  padding: 52px 20px 100px;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 500px; margin: 0 auto; }

/* ── Header ── */
.header { text-align: center; margin-bottom: 44px; }
.header-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; opacity: 0.9; }
.header h1 {
  font-size: 40px; font-weight: 700; letter-spacing: -1.2px; line-height: 1.05;
  background: linear-gradient(140deg, #F2F2F7 30%, rgba(242,242,247,0.55) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.header p { font-size: 14px; color: var(--secondary); margin-top: 10px; letter-spacing: 0.1px; }

/* ── Progress ── */
.progress { display: flex; align-items: flex-start; justify-content: center; margin-bottom: 44px; }
.prog-step { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.prog-dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 1.5px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--muted);
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}
.prog-step.active .prog-dot { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 0 20px rgba(61,155,255,0.4); }
.prog-step.done   .prog-dot { background: #30D158; border-color: #30D158; color: white; box-shadow: 0 0 14px rgba(48,209,88,0.35); }
.prog-label { font-size: 11px; font-weight: 500; color: var(--muted); }
.prog-step.active .prog-label { color: var(--accent); }
.prog-step.done   .prog-label { color: #30D158; }
.prog-line { height: 1.5px; width: 68px; background: rgba(255,255,255,0.09); margin: 15px 4px 0; border-radius: 2px; transition: background 0.4s ease; flex-shrink: 0; }
.prog-line.done { background: #30D158; box-shadow: 0 0 8px rgba(48,209,88,0.4); }

.form-progress {
  position: sticky; top: 0; z-index: 20;
  margin: -22px 0 24px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-md);
  background: rgba(13,14,24,0.82);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.24);
}
.form-progress-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 9px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(242,242,247,0.58);
}
.form-progress-track {
  height: 5px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,0.08);
}
.form-progress-fill {
  width: 0%; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #3D9BFF, #BF5AF2, #FF5E9E);
  box-shadow: 0 0 18px rgba(61,155,255,0.35);
  transition: width 220ms ease;
}

/* ── Card ── */
.card {
  background: var(--surface);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 36px 32px 32px;
  animation: slideUp 0.4s cubic-bezier(0.4,0,0.2,1);
}
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.card-step { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; opacity: 0.8; }
.card-title { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 4px; }
.card-subtitle { font-size: 14px; color: var(--secondary); margin-bottom: 30px; }

/* ── Section divider ── */
.section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted); margin: 26px 0 14px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sl-identity  { color: rgba(96,165,250,0.9);  border-bottom-color: rgba(96,165,250,0.2); }
.sl-spiritual { color: rgba(167,139,250,0.9); border-bottom-color: rgba(167,139,250,0.2); }
.sl-culture   { color: rgba(251,146,60,0.9);  border-bottom-color: rgba(251,146,60,0.2); }
.sl-life      { color: rgba(52,211,153,0.9);  border-bottom-color: rgba(52,211,153,0.2); }
.sl-balance   { color: rgba(251,191,36,0.9);  border-bottom-color: rgba(251,191,36,0.2); }
.sl-psych     { color: rgba(244,114,182,0.9); border-bottom-color: rgba(244,114,182,0.2); }
.sl-opt { font-weight:400; text-transform:none; letter-spacing:0; font-size:10px; color:var(--muted); margin-left:6px; }
.form-stage-hidden { display: none !important; }
.form-stage-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  margin: 20px 0 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
}
.form-stage-tabs span {
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.form-stage-tabs span.active {
  color: var(--primary);
  background: linear-gradient(135deg, rgba(61,155,255,0.22), rgba(255,61,150,0.16));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.form-stage-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}
.form-stage-nav .btn:only-child { grid-column: 1 / -1; }

/* ── Fields ── */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.7px; text-transform: uppercase; color: var(--secondary); margin-bottom: 8px; }
.field label .opt { font-weight: 400; font-size: 10px; letter-spacing: 0; text-transform: none; color: var(--muted); margin-left: 5px; }
.field input, .field select {
  width: 100%; padding: 13px 16px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  border-radius: var(--radius-md); font-size: 15px; font-family: inherit;
  color: var(--primary); outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder { color: var(--muted); }
.field input:focus, .field select:focus {
  border-color: var(--accent); background: rgba(61,155,255,0.07);
  box-shadow: 0 0 0 3px rgba(61,155,255,0.15);
}
.field select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23aeaeb2' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 42px; cursor: pointer;
}
.field select option { background: #1C1C2E; color: #F2F2F7; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.6); cursor: pointer; opacity: 0.7; }

/* ── Standard Pill ── */
.pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-btn {
  position: relative; flex: 1; min-width: 96px; padding: 14px 12px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.05); border-radius: var(--radius-md);
  font-size: 13px; font-weight: 650; font-family: inherit;
  color: var(--secondary); cursor: pointer; text-align: center;
  transition: all 0.2s ease; line-height: 1.3;
}
.pill-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(61,155,255,0.07); }
.pill-btn.active { background: linear-gradient(135deg, rgba(61,155,255,0.95), rgba(191,90,242,0.82)); color: white; border-color: rgba(255,255,255,0.36); box-shadow: 0 0 0 3px rgba(61,155,255,0.16), 0 12px 26px rgba(61,155,255,0.24); }
.pill-btn.active::after {
  content: "✓"; position: absolute; top: 7px; right: 9px;
  width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.2); color: white;
  font-size: 11px; font-weight: 800;
}

/* ── Rich Pill (avec description) ── */
.pill-stack { display: flex; flex-direction: column; gap: 9px; }
.rich-pill {
  position: relative; width: 100%; padding: 16px 42px 16px 17px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.05); border-radius: var(--radius-md);
  font-family: inherit; cursor: pointer; text-align: left;
  transition: all 0.2s ease;
}
.rich-pill:hover { border-color: rgba(61,155,255,0.45); background: rgba(61,155,255,0.06); }
.rich-pill.active { background: linear-gradient(135deg, rgba(61,155,255,0.18), rgba(191,90,242,0.12)); border-color: rgba(61,155,255,0.86); box-shadow: 0 0 0 3px rgba(61,155,255,0.13), 0 14px 30px rgba(61,155,255,0.16); }
.rich-pill.active::after {
  content: "✓"; position: absolute; top: 15px; right: 15px;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: white;
  font-size: 12px; font-weight: 800;
}
.rp-title { display: block; font-size: 14px; font-weight: 750; color: var(--primary); }
.rp-desc  { display: block; font-size: 12.5px; color: var(--secondary); margin-top: 5px; line-height: 1.55; font-style: italic; }
.rich-pill.active .rp-desc { color: rgba(242,242,247,0.82); }

/* ── Language Tags ── */
.lang-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-tag {
  padding: 7px 14px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); font-size: 13px; font-weight: 500;
  cursor: pointer; user-select: none; color: rgba(242,242,247,0.75); transition: all 0.18s ease;
}
.lang-tag:hover { border-color: var(--accent); color: var(--accent); background: rgba(61,155,255,0.08); }
.lang-tag.selected { background: var(--accent); color: white; border-color: var(--accent); box-shadow: 0 0 12px rgba(61,155,255,0.3); }

/* ── Lang picker ── */
.lang-picker { display: flex; flex-direction: column; gap: 8px; }
.lang-top { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-expand-btn {
  align-self: flex-start; display: flex; align-items: center; gap: 6px;
  background: none; border: 1px dashed rgba(255,255,255,0.18); border-radius: 100px;
  padding: 6px 13px; font-family: inherit; font-size: 12px; font-weight: 600;
  color: rgba(242,242,247,0.45); cursor: pointer; transition: all 0.18s ease;
}
.lang-expand-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-expand-btn .leb-arrow { font-size: 9px; transition: transform 0.22s ease; display: inline-block; }
.lang-expand-btn.open .leb-arrow { transform: rotate(180deg); }
.lang-expand-panel {
  display: flex; flex-wrap: wrap; gap: 8px;
  overflow: hidden; max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.25s ease;
  opacity: 0;
}
.lang-expand-panel.open { max-height: 400px; opacity: 1; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: rgba(48,209,88,0.14); border: 1px solid rgba(48,209,88,0.4);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 100px; padding: 10px 22px;
  font-size: 13px; font-weight: 600; color: #30D158;
  opacity: 0; pointer-events: none; z-index: 9500;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.25s ease;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── Copy button ── */
.btn-copy {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px; border: 1px solid rgba(255,255,255,0.11);
  border-radius: var(--radius-md); background: rgba(255,255,255,0.04);
  color: var(--secondary); font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.18s ease; margin-bottom: 10px;
}
.btn-copy:hover { border-color: var(--accent); color: var(--primary); background: rgba(61,155,255,0.06); }

/* ── History ── */
.history-section { margin: 28px 0 18px; }
.history-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: none; padding: 0 2px; cursor: pointer;
  color: var(--muted); font-family: inherit; font-size: 11px;
  font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
}
.history-toggle .h-arrow { font-size: 9px; transition: transform 0.22s ease; }
.history-section.open .h-arrow { transform: rotate(180deg); }
.history-list { overflow: hidden; max-height: 0; transition: max-height 0.35s ease; }
.history-section.open .history-list { max-height: 600px; }
.history-item {
  display: flex; align-items: center; gap: 14px; margin-top: 9px;
  padding: 12px 16px; border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  transition: background 0.15s;
}
.history-item:hover { background: rgba(255,255,255,0.07); }
.history-names { font-size: 13px; font-weight: 600; }
.history-date  { font-size: 11px; color: var(--muted); margin-top: 2px; }
.history-score { font-size: 20px; font-weight: 700; color: var(--accent); line-height: 1; }
.history-verdict { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* ── Weights ── */
.weights-section { margin-bottom: 14px; }
.weights-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: 1px dashed rgba(255,255,255,0.14);
  border-radius: var(--radius-md); padding: 11px 16px;
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: rgba(242,242,247,0.36); cursor: pointer; transition: all 0.18s ease;
}
.weights-toggle:hover { border-color: rgba(255,255,255,0.3); color: var(--secondary); }
.wt-arrow { font-size: 9px; transition: transform 0.22s ease; margin-left: auto; }
.weights-section.open .wt-arrow { transform: rotate(180deg); }
.weights-panel { overflow: hidden; max-height: 0; transition: max-height 0.38s ease; }
.weights-section.open .weights-panel { max-height: 700px; }
.weights-inner { padding: 10px 0 4px; }
.weight-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 2px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.weight-row:last-child { border-bottom: none; }
.weight-dim { flex: 1; font-size: 12px; color: var(--secondary); }
.weight-btns { display: flex; gap: 4px; }
.weight-btn {
  border: none; border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 700;
  font-family: inherit; cursor: pointer; transition: all 0.14s ease;
  background: rgba(255,255,255,0.07); color: rgba(242,242,247,0.4);
}
.weight-btn:hover { color: var(--primary); }
.weight-btn.wactive { background: rgba(61,155,255,0.2); color: var(--accent); }

/* ── Advice tip ── */
.advice-tip {
  margin-top: 8px; font-size: 11px; line-height: 1.55;
  color: rgba(61,155,255,0.85); background: rgba(61,155,255,0.07);
  border-radius: 8px; padding: 8px 11px;
  border-left: 2px solid rgba(61,155,255,0.3);
}
[dir="rtl"] .advice-tip { border-left: none; border-right: 2px solid rgba(61,155,255,0.3); }

/* ── Persona chooser ── */
.persona-card { text-align: center; padding-top: 30px; }
.persona-card .card-title { font-size: 24px; }
.persona-card .card-subtitle { max-width: 330px; margin-left: auto; margin-right: auto; margin-bottom: 22px; }
.persona-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.persona-option {
  position: relative; overflow: hidden; min-height: 152px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035)),
    rgba(255,255,255,0.04);
  color: var(--primary); padding: 16px 12px 14px; font-family: inherit;
  cursor: pointer; transition: all 0.22s ease; text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.persona-option::before {
  content: ""; position: absolute; inset: -55% -35% auto; height: 150px;
  background: radial-gradient(circle, var(--persona-glow), transparent 64%);
  opacity: 0.42; transition: opacity 0.22s ease, transform 0.22s ease;
}
.persona-option::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 35%, rgba(255,255,255,0.09), transparent 65%);
  opacity: 0; transform: translateX(-80%); transition: opacity 0.22s ease, transform 0.45s ease;
}
.persona-option:hover {
  border-color: color-mix(in srgb, var(--persona-accent) 62%, white 8%);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.105), rgba(255,255,255,0.045)),
    rgba(255,255,255,0.04);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25), 0 0 24px color-mix(in srgb, var(--persona-accent) 24%, transparent);
}
.persona-option:hover::before { opacity: 0.65; transform: translateY(8px) scale(1.05); }
.persona-option:hover::after { opacity: 1; transform: translateX(80%); }
.persona-option.male { --persona-accent: #3D9BFF; --persona-glow: rgba(61,155,255,0.72); }
.persona-option.female { --persona-accent: #FF5FA2; --persona-glow: rgba(255,95,162,0.62); }
.persona-icon {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--persona-accent) 48%, white 10%);
  background:
    radial-gradient(circle at 32% 25%, rgba(255,255,255,0.22), transparent 28%),
    color-mix(in srgb, var(--persona-accent) 18%, rgba(255,255,255,0.05));
  color: var(--persona-accent); font-size: 27px; font-weight: 700;
  box-shadow: 0 0 22px color-mix(in srgb, var(--persona-accent) 28%, transparent);
}
.persona-icon::before, .persona-icon::after {
  content: ""; position: absolute; border-radius: 50%; background: var(--persona-accent);
  box-shadow: 0 0 10px var(--persona-accent); opacity: 0.85;
}
.persona-icon::before { width: 5px; height: 5px; top: 9px; right: 11px; }
.persona-icon::after { width: 3px; height: 3px; bottom: 12px; left: 12px; opacity: 0.55; }
.persona-label { position: relative; z-index: 1; display: block; font-size: 14px; font-weight: 700; }
.persona-desc { position: relative; z-index: 1; display: block; font-size: 11px; color: var(--secondary); margin-top: 6px; line-height: 1.45; }
.persona-line {
  position: relative; z-index: 1; width: 44px; height: 3px; border-radius: 100px;
  margin: 12px auto 0; background: var(--persona-accent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--persona-accent) 55%, transparent);
  opacity: 0.86;
}

/* ── Buttons ── */
.btn { width: 100%; padding: 15px; border: none; border-radius: var(--radius-md); font-size: 16px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all 0.2s ease; }
.btn-primary { background: var(--accent); color: white; margin-top: 10px; box-shadow: 0 4px 20px rgba(61,155,255,0.3); }
.btn-primary:hover { background: #5AABFF; transform: translateY(-1px); box-shadow: 0 8px 28px rgba(61,155,255,0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: rgba(255,255,255,0.06); color: var(--secondary); border: 1px solid var(--border); margin-top: 10px; }
.btn-ghost:hover { background: rgba(255,255,255,0.09); }
.btn-step-back {
  width: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 11px; margin-bottom: 18px; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px; background: rgba(255,255,255,0.04);
  color: var(--secondary); font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.18s ease;
}
.btn-step-back:hover { border-color: var(--accent); color: var(--primary); background: rgba(61,155,255,0.07); }

/* ── Atheism disable ── */
.field-disabled { opacity: 0.35; pointer-events: none; transition: opacity 0.25s ease; }

/* ── Share invite ── */
.share-invite {
  margin-bottom: 24px; padding: 14px 15px;
  border: 1px solid rgba(61,155,255,0.22); border-radius: var(--radius-md);
  background: rgba(61,155,255,0.07);
}
.share-invite-title { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.share-invite-text { font-size: 12px; line-height: 1.5; color: var(--secondary); margin-bottom: 12px; }
.share-invite .btn { margin-top: 0; padding: 12px; font-size: 14px; }

/* ── Results top ── */
.results-top {
  background: var(--surface); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 44px 32px 36px; text-align: center;
  margin-bottom: 14px; animation: slideUp 0.4s cubic-bezier(0.4,0,0.2,1);
}
.couple-names { font-size: 15px; font-weight: 500; color: var(--secondary); letter-spacing: 0.5px; margin-bottom: 28px; }
.ring-wrap { display: flex; justify-content: center; margin-bottom: 26px; }
.ring-box  { position: relative; width: 154px; height: 154px; }
.ring-box svg { transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 10; }
.ring-fill  { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.4s cubic-bezier(0.4,0,0.2,1); }
.ring-text  { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; pointer-events: none; }
.ring-number { font-size: 44px; font-weight: 700; letter-spacing: -2px; line-height: 1; display: block; }
.ring-denom  { font-size: 13px; color: var(--secondary); display: block; margin-top: 2px; }
.verdict-label { font-size: 27px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 6px; }
.verdict-sub   { font-size: 14px; color: var(--secondary); }
.dealbreaker {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  margin-top: 20px; padding: 12px 18px; border-radius: 12px;
  background: rgba(255,69,58,0.1); border: 1px solid rgba(255,69,58,0.22);
  font-size: 13px; font-weight: 500; color: #FF6B61;
  animation: slideUp 0.4s ease 0.3s both;
}

/* ── Breakdown ── */
.breakdown {
  background: var(--surface); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 28px 32px; margin-bottom: 14px;
  animation: slideUp 0.5s cubic-bezier(0.4,0,0.2,1) 0.06s both;
}
.breakdown-label { font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.score-row { margin-bottom: 20px; }
.score-row:last-child { margin-bottom: 0; }
.score-row-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 9px; }
.score-row-name   { font-size: 14px; font-weight: 600; color: var(--primary); }
.score-row-detail { font-size: 12px; color: var(--secondary); margin-top: 2px; line-height: 1.4; }
.score-row-pts    { font-size: 15px; font-weight: 700; white-space: nowrap; padding-left: 12px; flex-shrink: 0; }
.score-row-denom  { font-size: 12px; font-weight: 400; color: var(--muted); }
.bar-track { height: 4px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 3px; width: 0%; transition: width 1.2s cubic-bezier(0.4,0,0.2,1) 0.25s; }

/* ── Observation ── */
.obs-card {
  background: var(--surface); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 28px 32px; margin-bottom: 14px;
  animation: slideUp 0.5s cubic-bezier(0.4,0,0.2,1) 0.12s both;
}
.obs-hdr {
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.obs-body { font-size: 14px; line-height: 1.82; color: var(--secondary); }
.obs-body strong { color: var(--primary); font-weight: 600; }

/* ── Questions ── */
.questions-card {
  background: var(--surface); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 28px 32px; margin-bottom: 14px;
  animation: slideUp 0.5s cubic-bezier(0.4,0,0.2,1) 0.18s both;
}
.q-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.q-item:first-child { padding-top: 0; }
.q-item:last-child { border-bottom: none; padding-bottom: 0; }
.q-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  background: rgba(61,155,255,0.12); border: 1px solid rgba(61,155,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--accent);
}
.q-text { font-size: 14px; color: var(--primary); line-height: 1.55; font-style: italic; }
.q-why  { font-size: 11px; color: var(--muted); margin-top: 5px; }

/* ── Footer ── */
.disclaimer { text-align: center; font-size: 11px; color: var(--muted); line-height: 1.75; margin-top: 10px; padding: 0 12px; }
.btn-restart {
  display: block; margin: 22px auto 0; padding: 10px 20px;
  background: none; border: 1px solid rgba(255,255,255,0.1); border-radius: 100px;
  font-family: inherit; font-size: 14px; font-weight: 500; color: var(--accent); cursor: pointer;
  transition: all 0.2s ease;
}
.btn-restart:hover { background: rgba(61,155,255,0.1); border-color: var(--accent); }

.hidden { display: none !important; }
.row-2  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Pill pop animation ── */
@keyframes pillPop {
  0%   { transform: scale(0.94); }
  55%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.pill-btn.active  { animation: pillPop 0.22s cubic-bezier(0.34,1.56,0.64,1) both; }
.rich-pill.active { animation: pillPop 0.22s cubic-bezier(0.34,1.56,0.64,1) both; }
.lang-tag.selected { animation: pillPop 0.18s cubic-bezier(0.34,1.56,0.64,1) both; }

/* ── Ring margin ── */
.ring-margin { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 5px; letter-spacing: 0.3px; }

/* ── Profiles card ── */
.profiles-card {
  background: var(--surface); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 24px 28px; margin-bottom: 14px;
  animation: slideUp 0.45s cubic-bezier(0.4,0,0.2,1) 0.03s both;
}
.profiles-cols { display: grid; grid-template-columns: 1fr 22px 1fr; gap: 14px; align-items: start; }
.profiles-divider { font-size: 16px; font-weight: 300; color: var(--muted); text-align: center; padding-top: 6px; }
.profile-name { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 9px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.profile-tag {
  font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 100px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(242,242,247,0.72); line-height: 1.5;
}

.result-summary-card {
  background: var(--surface); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 24px 28px; margin-bottom: 14px;
  animation: slideUp 0.48s cubic-bezier(0.4,0,0.2,1) 0.05s both;
}
.summary-hdr, .summary-title {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted);
}
.summary-hdr { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.summary-box {
  border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04); padding: 14px;
}
.summary-title { margin-bottom: 9px; }
.summary-box ul { list-style: none; display: grid; gap: 7px; }
.summary-box li {
  position: relative; padding-left: 16px;
  color: rgba(242,242,247,0.78); font-size: 13px; line-height: 1.45;
}
.summary-box li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.summary-risks li::before { background: #FF9F0A; }
.summary-share p { color: rgba(242,242,247,0.82); font-size: 13.5px; line-height: 1.65; }

/* ── Alerts card ── */
.alerts-card {
  background: rgba(255,69,58,0.05); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255,69,58,0.2); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 24px 28px; margin-bottom: 14px;
  animation: slideUp 0.5s cubic-bezier(0.4,0,0.2,1) 0.09s both;
}
.alerts-hdr {
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
  color: rgba(255,107,97,0.9); margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,69,58,0.15);
}
.alert-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.05); gap: 12px; }
.alert-item:first-child { padding-top: 0; }
.alert-item:last-child { border-bottom: none; padding-bottom: 0; }
.alert-dim    { font-size: 13px; font-weight: 600; color: var(--primary); }
.alert-detail { font-size: 12px; color: var(--secondary); margin-top: 2px; line-height: 1.4; }
.alert-pct    { font-size: 14px; font-weight: 700; color: #FF6B61; flex-shrink: 0; white-space: nowrap; }

/* ── Horsemen (4 Cavaliers de Gottman) ── */
.horsemen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.horseman-check {
  display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  cursor: pointer; background: rgba(255,255,255,0.04); transition: all 0.2s ease;
}
.horseman-check:hover { border-color: rgba(255,69,58,0.35); background: rgba(255,69,58,0.05); }
.horseman-check input[type="checkbox"] {
  width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; cursor: pointer; accent-color: #FF453A;
}
.h-title { display: block; font-size: 12px; font-weight: 600; color: var(--primary); line-height: 1.3; }
.h-desc  { display: block; font-size: 11px; color: var(--secondary); margin-top: 2px; line-height: 1.4; }
.horseman-check:has(input:checked) { background: rgba(255,69,58,0.09); border-color: rgba(255,69,58,0.42); }

/* ── Know-level bar ── */
.know-bar { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }
.know-bar .pill-btn { min-width: unset; font-size: 12px; padding: 10px 6px; }

/* ── Confetti ── */
@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0deg);    opacity: 1; }
  85%  { opacity: 0.7; }
  100% { transform: translateY(110vh) rotate(800deg); opacity: 0; }
}

/* ── Lang Switcher ── */
.lang-sw {
  position: fixed; top: 14px; right: 14px; z-index: 1000;
}
.lang-sw-trigger {
  display: flex; align-items: center; gap: 6px;
  background: rgba(13,14,24,0.88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.13); border-radius: 100px;
  padding: 6px 12px 6px 10px; cursor: pointer;
  color: var(--primary); font-family: inherit; font-size: 11px; font-weight: 700;
  letter-spacing: 0.5px; transition: border-color 0.18s ease;
}
.lang-sw-trigger:hover { border-color: rgba(255,255,255,0.28); }
.lang-sw-trigger .lsw-globe { font-size: 14px; opacity: 0.7; }
.lang-sw-trigger .lsw-current { color: var(--accent); }
.lang-sw-trigger .lsw-arrow {
  opacity: 0.45; font-size: 9px; transition: transform 0.2s ease;
  display: inline-block;
}
.lang-sw.open .lsw-arrow { transform: rotate(180deg); }
.lang-sw-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: rgba(13,14,24,0.96); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.13); border-radius: 14px;
  padding: 5px; min-width: 130px;
  opacity: 0; transform: translateY(-6px) scale(0.97);
  pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease;
}
.lang-sw.open .lang-sw-dropdown {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}
.lang-sw-dropdown button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  background: none; border: none; border-radius: 9px;
  padding: 8px 11px; cursor: pointer; font-family: inherit;
  font-size: 12px; font-weight: 600; color: rgba(242,242,247,0.55);
  transition: background 0.14s ease, color 0.14s ease; text-align: left;
}
.lang-sw-dropdown button:hover { background: rgba(255,255,255,0.07); color: var(--primary); }
.lang-sw-dropdown button.lsw-active { color: var(--primary); background: rgba(61,155,255,0.12); }
.lang-sw-dropdown button.lsw-active .lsw-check { opacity: 1; }
.lang-sw-dropdown .lsw-flag { font-size: 16px; }
.lang-sw-dropdown .lsw-name { flex: 1; }
.lang-sw-dropdown .lsw-check { margin-left: auto; opacity: 0; color: var(--accent); font-size: 12px; }

/* ── RTL (Arabic) ── */
[dir="rtl"] body { font-family: 'Noto Sans Arabic','Inter',sans-serif; }
[dir="rtl"] .lang-sw { right: auto; left: 14px; }
[dir="rtl"] .lang-sw-dropdown { right: auto; left: 0; }
[dir="rtl"] .lang-sw-dropdown button { text-align: right; }
[dir="rtl"] .field select {
  background-position: left 14px center;
  padding-right: 16px; padding-left: 42px;
}
[dir="rtl"] .score-row-pts { padding-left: 0; padding-right: 12px; }
[dir="rtl"] .q-item { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .profiles-cols { direction: rtl; }
[dir="rtl"] .alert-item { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .horseman-check { flex-direction: row-reverse; }
[dir="rtl"] .ring-text { font-family: 'Noto Sans Arabic','Inter',sans-serif; }

/* ── Responsive — Mobile (<480px) ── */
@media (max-width: 480px) {
  body { padding: 56px 12px 150px; }
  .header h1 { font-size: 32px; }
  .header p  { font-size: 13px; }
  .card { padding: 22px 16px 34px; }
  .card-title { font-size: 22px; }
  .results-top { padding: 30px 18px 26px; }
  .breakdown, .obs-card, .questions-card, .result-summary-card { padding: 20px 16px; }
  .profiles-card, .alerts-card { padding: 18px 14px; }
  .row-2 { grid-template-columns: 1fr; }
  .persona-options { grid-template-columns: 1fr; }
  .horsemen-grid { grid-template-columns: 1fr; }
  .know-bar { grid-template-columns: 1fr 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .form-progress { margin-top: -18px; }
  .ring-box { width: 126px; height: 126px; }
  .ring-box svg { width: 126px; height: 126px; }
  .ring-number { font-size: 34px; }
  .prog-line { width: 40px; }
  .prog-dot  { width: 27px; height: 27px; font-size: 11px; }
  .prog-label { font-size: 10px; }
  .lang-sw { top: 10px; right: 10px; }
  [dir="rtl"] .lang-sw { left: 10px; right: auto; }
}

/* ── Responsive — Tablet (481-1023px) ── */
@media (min-width: 481px) and (max-width: 1023px) {
  .container { max-width: 580px; }
}

/* ── Responsive — Desktop (≥1024px) ── */
@media (min-width: 1024px) {
  .container { max-width: 620px; }
  body { padding: 60px 40px 100px; }
}
