/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #0f0c07;
  --bg: #15120d;
  --surface: #1f1a13;
  --surface-raised: #29231a;
  --accent: #C0A062;
  --accent-warm: #D4B97A;
  --text: #EAE6DC;
  --text2: #8a8375;
  --error: #CF6679;
  --success: #4CAF50;
  --warning: #FFA726;
  --match: #7B9EC6;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Work Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
  overflow: hidden;
}

/* Subtle grain — editorial texture over the flat dark */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 9999;
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* Landing — soft warm glow behind the hero */
#landing {
  background:
    radial-gradient(ellipse 75% 55% at 50% 28%, rgba(192,160,98,0.08), transparent 65%),
    radial-gradient(ellipse 100% 40% at 50% 100%, rgba(212,185,122,0.03), transparent 60%);
}

/* ===== SCREENS ===== */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.45s ease;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===== ENTRANCE ANIMATIONS ===== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes draw-check {
  from { stroke-dashoffset: 32; }
  to { stroke-dashoffset: 0; }
}

@keyframes shimmer-sweep {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(260%); }
}

/* Landing entrance — staggered reveal */
#landing.active .landing-eyebrow,
#landing.active .title-numeral,
#landing.active .title-word,
#landing.active .landing-rule,
#landing.active .landing-subtitle,
#landing.active .landing-bottom .btn-primary,
#landing.active .landing-time,
#landing.active .landing-privacy {
  opacity: 0;
  animation: fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#landing.active .landing-eyebrow  { animation-delay: 0.10s; }
#landing.active .title-numeral    { animation-delay: 0.18s; animation-duration: 1.1s; }
#landing.active .title-word       { animation-delay: 0.34s; }
#landing.active .landing-rule     { animation-delay: 0.48s; }
#landing.active .landing-subtitle { animation-delay: 0.58s; }
#landing.active .landing-bottom .btn-primary { animation-delay: 0.72s; }
#landing.active .landing-time     { animation-delay: 0.84s; }
#landing.active .landing-privacy  { animation-delay: 0.92s; }

/* Results entrance — staggered reveal */
#results.active .results-eyebrow,
#results.active .results-title,
#results.active .results-header .landing-rule,
#results.active .results-radar,
#results.active .results-section:nth-child(3),
#results.active .results-section:nth-child(4),
#results.active .results-section:nth-child(6),
#results.active .results-actions {
  opacity: 0;
  animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#results.active .results-eyebrow                 { animation-delay: 0.05s; }
#results.active .results-title                   { animation-delay: 0.15s; animation-duration: 0.9s; }
#results.active .results-header .landing-rule    { animation-delay: 0.30s; }
#results.active .results-radar                   { animation-delay: 0.35s; animation-duration: 0.9s; }
#results.active .results-section:nth-child(3)    { animation-delay: 0.55s; }
#results.active .results-section:nth-child(4)    { animation-delay: 0.70s; }
#results.active .results-section:nth-child(6)    { animation-delay: 0.85s; }
#results.active .results-actions                 { animation-delay: 1.00s; }

/* ===== LANDING ===== */
.landing-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 32px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.landing-top {
  padding-top: 15vh;
}

.landing-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 16px;
}

.landing-title {
  margin-bottom: 28px;
  line-height: 1;
}

.title-numeral {
  display: block;
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(120px, 22vw, 280px);
  line-height: 0.88;
  letter-spacing: -0.045em;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-warm) 65%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--text);
  margin-bottom: 6px;
}

.title-word {
  display: block;
  font-family: 'EB Garamond', serif;
  font-weight: 600;
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--text);
}

.landing-rule {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 20px;
}

.landing-subtitle {
  font-size: 15px;
  font-weight: 300;
  color: var(--text2);
  line-height: 1.7;
  max-width: 340px;
}

.landing-bottom {
  text-align: center;
}

.landing-time {
  font-size: 12px;
  color: var(--text2);
  margin-top: 12px;
}

.landing-privacy {
  font-size: 11px;
  color: rgba(136,136,136,0.6);
  margin-top: 8px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #000;
  border: none;
  padding: 14px 36px;
  font-family: 'Work Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: opacity 0.3s;
  width: 100%;
  max-width: 320px;
}

.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { opacity: 0.8; }

.btn-small {
  padding: 10px 24px;
  width: auto;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(192,160,98,0.3);
  padding: 12px 24px;
  font-family: 'Work Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
  max-width: 320px;
}

.btn-secondary:hover {
  background: rgba(192,160,98,0.08);
  border-color: var(--accent);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text2);
  font-family: 'Work Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-back {
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

/* ===== QUIZ ===== */
.quiz-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  flex-shrink: 0;
}

.progress-bar {
  flex: 1;
  height: 2px;
  background: rgba(234,234,234,0.08);
  position: relative;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: shimmer-sweep 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.progress-text {
  font-size: 11px;
  color: var(--text2);
  letter-spacing: 0.5px;
  white-space: nowrap;
  min-width: 40px;
  text-align: right;
}

.quiz-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px 24px;
  -webkit-overflow-scrolling: touch;
}

.category-title {
  font-family: 'EB Garamond', serif;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 600;
  letter-spacing: -0.6px;
  margin-bottom: 8px;
}

.category-hint {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 20px;
}

.limit-icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--error);
  color: var(--error);
  font-size: 9px;
  font-weight: 700;
  vertical-align: -2px;
}

/* Kink card grid */
.kink-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kink-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid rgba(234,234,234,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

@media (hover: hover) {
  .kink-card:hover {
    border-color: rgba(234,234,234,0.18);
    background: var(--surface-raised);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 6px 18px rgba(0,0,0,0.28);
  }
}

.kink-card.selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(192,160,98,0.14), rgba(192,160,98,0.04));
  box-shadow: inset 0 1px 0 rgba(212,185,122,0.12);
}

.kink-card.hard-limit {
  border-color: var(--error);
  background: linear-gradient(135deg, rgba(207,102,121,0.11), rgba(207,102,121,0.03));
  box-shadow: inset 0 1px 0 rgba(207,102,121,0.08);
}

.kink-checkbox {
  width: 20px;
  height: 20px;
  border: 1.5px solid rgba(234,234,234,0.2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.kink-card.selected .kink-checkbox {
  border-color: var(--accent);
  background: var(--accent);
}

.kink-card.hard-limit .kink-checkbox {
  border-color: var(--error);
  background: var(--error);
}

.kink-checkbox svg {
  opacity: 0;
  transition: opacity 0.2s;
}

.kink-checkbox svg polyline,
.kink-checkbox svg line {
  stroke-dasharray: 32;
  stroke-dashoffset: 32;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kink-card.selected .kink-checkbox svg,
.kink-card.hard-limit .kink-checkbox svg {
  opacity: 1;
}

.kink-card.selected .kink-checkbox svg polyline,
.kink-card.hard-limit .kink-checkbox svg line {
  animation: draw-check 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.kink-card.hard-limit .kink-checkbox svg line:nth-child(2) {
  animation-delay: 0.08s;
}

.kink-name {
  flex: 1;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
}

.kink-card.hard-limit .kink-name {
  color: var(--error);
  text-decoration: line-through;
  text-decoration-color: rgba(207,102,121,0.4);
}

.kink-limit-btn {
  background: none;
  border: 1px solid rgba(207,102,121,0.3);
  color: var(--error);
  width: 24px;
  height: 24px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.kink-card:hover .kink-limit-btn,
.kink-card.hard-limit .kink-limit-btn {
  opacity: 1;
}

.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid rgba(234,234,234,0.06);
  flex-shrink: 0;
}

/* ===== IMPORTANCE SCREEN ===== */
.importance-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px 24px;
  -webkit-overflow-scrolling: touch;
}

.section-title {
  font-family: 'EB Garamond', serif;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 600;
  letter-spacing: -0.6px;
  margin-bottom: 8px;
}

.section-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 24px;
}

.importance-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.importance-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid rgba(234,234,234,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.importance-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

/* Shared toggle button styles (role + importance use same base) */
.toggle-group {
  display: flex;
  flex: 1;
}

.toggle-group button {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(234,234,234,0.12);
  color: var(--text2);
  font-family: 'Work Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 7px 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  margin-left: -1px;
}

.toggle-group button:first-child { margin-left: 0; }

.toggle-group button.active {
  background: rgba(192,160,98,0.12);
  border-color: var(--accent);
  color: var(--accent);
  z-index: 1;
}

/* Per-kink importance item with role */
.importance-item {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.importance-row {
  display: flex;
  align-items: center;
  gap: 0;
}

/* ===== RESULTS ===== */
.results-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.results-header {
  text-align: center;
  padding: 48px 24px 0;
}

.results-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}

.results-title {
  font-family: 'EB Garamond', serif;
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 600;
  letter-spacing: -2px;
  line-height: 0.95;
}

.results-radar {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.results-radar canvas {
  max-width: 100%;
  height: auto !important;
}

/* Results sections */
.results-section {
  padding: 0 24px;
  margin-bottom: 40px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.section-number {
  font-family: 'EB Garamond', serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.section-label {
  font-family: 'EB Garamond', serif;
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.5px;
}

.section-desc-sm {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 440px;
}

/* Role Spectrum Strip */
.spectrum-box {
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
  border: 1px solid rgba(192,160,98,0.22);
  padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 4px 20px rgba(0,0,0,0.15);
}

.spectrum-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.spectrum-labels span {
  font-size: 9px;
  color: var(--text2);
  letter-spacing: 1.25px;
  text-transform: uppercase;
  font-weight: 600;
}

.spectrum-track {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--accent), #555 40%, #555 60%, var(--match));
  margin-bottom: 12px;
}

.spectrum-marker {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  transform: translate(-50%, -50%);
  transition: left 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 8px rgba(192,160,98,0.4);
}

.spectrum-reading {
  font-family: 'EB Garamond', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

/* Dimension Summary Cards */
.dim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dim-card {
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
  border: 1px solid rgba(192,160,98,0.22);
  padding: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 4px 16px rgba(0,0,0,0.18);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
  .dim-card:hover {
    border-color: rgba(192,160,98,0.38);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 8px 24px rgba(0,0,0,0.25);
  }
}

.dim-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.25px;
  color: var(--text2);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.dim-value {
  font-family: 'EB Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.dim-desc {
  font-size: 10px;
  color: var(--text2);
}

/* Breadth arc — canvas drawn */
.arc-container {
  width: 80px;
  height: 80px;
  margin: 0 auto 8px auto;
}

.arc-container canvas {
  width: 80px;
  height: 80px;
}

/* Depth bars */
.depth-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 50px;
  margin-bottom: 8px;
}

.depth-bar {
  flex: 1;
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Tall visual area for role + boundary cards */
.dim-card-visual-tall {
  height: 50px;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

/* Mini spectrum in card */
.mini-spectrum {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--accent), #555 40%, #555 60%, var(--match));
  margin-bottom: 8px;
}

.mini-marker {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  transform: translate(-50%, -50%);
  transition: left 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.mini-labels {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  color: #666;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Boundary bar in card */
.boundary-bar {
  display: flex;
  height: 8px;
  width: 100%;
  overflow: hidden;
  margin-bottom: 8px;
}

.boundary-seg {
  height: 100%;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.boundary-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.boundary-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: var(--text2);
}

.boundary-legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.results-divider {
  width: 60px;
  height: 1px;
  background: rgba(192,160,98,0.3);
  margin: 40px auto;
}

.results-rings {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.results-rings canvas {
  max-width: 100%;
  height: auto !important;
}

.rings-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  margin-bottom: 16px;
}

.legend-chip {
  font-size: 9px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-swatch {
  width: 12px;
  height: 6px;
  flex-shrink: 0;
}

.results-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
}

/* ===== COMPARE ===== */
.compare-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px 48px;
  -webkit-overflow-scrolling: touch;
}

.compare-input-group {
  margin-top: 8px;
  margin-bottom: 32px;
}

.input-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.25px;
  color: var(--text2);
  display: block;
  margin-bottom: 8px;
}

.text-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid rgba(234,234,234,0.1);
  color: var(--text);
  font-family: 'Work Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.text-input:focus {
  border-color: var(--accent);
}

.text-input::placeholder {
  color: rgba(136,136,136,0.5);
}

.compare-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text2);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.mutual-kinks {
  margin-top: 24px;
}

.mutual-section-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.25px;
  color: var(--accent);
  margin-bottom: 12px;
}

.mutual-tag {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 6px 6px 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
  background: rgba(192,160,98,0.08);
  border: 1px solid rgba(192,160,98,0.2);
}

.mutual-none {
  font-size: 13px;
  color: var(--text2);
  font-style: italic;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
  color: var(--text);
  border: 1px solid rgba(192,160,98,0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 8px 28px rgba(0,0,0,0.45);
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 500;
  z-index: 100;
  transition: bottom 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}

.toast.show {
  bottom: 32px;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 600px) {
  .kink-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

@media (min-width: 900px) {
  /* Landing — asymmetric 2-column editorial layout */
  .landing-content {
    flex-direction: row;
    align-items: center;
    gap: 80px;
    max-width: 1120px;
    padding: 48px 72px;
  }
  .landing-top { flex: 1.3; padding-top: 0; }
  .landing-bottom { flex: 1; text-align: left; }
  .landing-subtitle { max-width: 440px; font-size: 17px; line-height: 1.7; }
  .landing-rule { width: 88px; height: 3px; margin-bottom: 32px; }
  .landing-time, .landing-privacy { max-width: 320px; }

  /* Quiz + importance screens — centered column with real breathing room */
  .quiz-body, .importance-body {
    max-width: 1040px;
    margin: 0 auto;
    width: 100%;
    padding: 32px 64px 48px;
  }
  .quiz-header, .quiz-footer {
    max-width: 1040px;
    margin: 0 auto;
    width: 100%;
    padding: 24px 64px;
  }
  .kink-grid { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .kink-card { padding: 16px 20px; }
  .category-hint { font-size: 13px; margin-bottom: 32px; }

  /* Compare screen — narrower centered form */
  .compare-body {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    padding: 24px 48px 64px;
  }

  /* Results — editorial spacing and proportions */
  .results-header { padding: 80px 24px 8px; }
  .results-eyebrow { font-size: 11px; letter-spacing: 2.5px; margin-bottom: 16px; }
  .results-radar { padding: 32px 0; }
  .results-section {
    max-width: 960px;
    padding: 0 48px;
    margin-bottom: 64px;
  }
  .section-header { gap: 22px; align-items: center; margin-bottom: 14px; }
  .section-number {
    font-size: 64px;
    font-style: italic;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
    opacity: 0.55;
  }
  .section-desc-sm { font-size: 13px; margin-bottom: 28px; max-width: 520px; }

  /* Spectrum — more generous padding */
  .spectrum-box { padding: 32px 40px; }
  .spectrum-labels span { font-size: 10px; }
  .spectrum-reading { font-size: 18px; margin-top: 4px; }

  /* Dimension summary — 4-column dashboard */
  .dim-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .dim-card { padding: 24px; }

  /* Fingerprint rings — more presence */
  .results-rings { padding: 32px 0; }
  .rings-legend { gap: 12px; padding: 16px 48px 0; }

  /* Divider — wider + more breathing room */
  .results-divider { width: 80px; margin: 56px auto; }

  /* Actions — horizontal row instead of stacked */
  .results-actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 48px 96px;
    gap: 16px;
  }
  .results-actions .btn-primary,
  .results-actions .btn-secondary {
    width: auto;
    max-width: none;
    padding: 14px 32px;
  }

  /* Buttons — slightly more presence on Desktop */
  .btn-primary, .btn-secondary { font-size: 12.5px; letter-spacing: 1.75px; }
}

@media (min-width: 1200px) {
  .landing-content { max-width: 1280px; gap: 120px; padding: 64px 96px; }
  .quiz-body, .importance-body, .quiz-header, .quiz-footer { max-width: 1120px; padding-left: 80px; padding-right: 80px; }
  .dim-grid { gap: 20px; }
  .results-section { max-width: 1040px; padding: 0 64px; }
  .results-actions { max-width: 1040px; padding-left: 64px; padding-right: 64px; }
  .kink-grid { gap: 12px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(192,160,98,0.2); }

/* ===== FOCUS STATES ===== */
:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline-offset: 4px;
}

.text-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.kink-card:focus-visible,
.dim-card:focus-visible {
  outline-offset: 2px;
}

.toggle-group button:focus-visible {
  outline-offset: 1px;
  z-index: 2;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #landing.active .title-numeral,
  #landing.active .title-word,
  #landing.active .landing-eyebrow,
  #landing.active .landing-rule,
  #landing.active .landing-subtitle,
  #landing.active .landing-bottom .btn-primary,
  #landing.active .landing-time,
  #landing.active .landing-privacy,
  #results.active .results-eyebrow,
  #results.active .results-title,
  #results.active .results-header .landing-rule,
  #results.active .results-radar,
  #results.active .results-section,
  #results.active .results-actions {
    opacity: 1 !important;
    animation: none !important;
  }
}
