:root {
  --bg: #f5ede4;
  --bg-soft: #ede1d3;
  --ink: #362a22;
  --ink-soft: #7a6a5d;
  --terracotta: #c1694a;
  --terracotta-dark: #a24f36;
  --line: rgba(54, 42, 34, 0.12);
  --radius: 18px;

  /* dopamine accent — used sparingly: CTA, progress, result reveal only */
  --dopamine: #ff5a3c;
  --dopamine-glow: rgba(255, 90, 60, 0.45);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(rgba(54, 42, 34, 0.05) 1px, transparent 1px);
  background-size: 3px 3px;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
}

.progress {
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin-bottom: 32px;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0%;
  background: var(--dopamine);
  border-radius: 2px;
  transition: width 0.35s ease;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: fade-in 0.3s ease;
}

.screen[hidden] {
  display: none;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mark {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-style: italic;
  color: var(--terracotta-dark);
  font-size: 15px;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
}

.title {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.25;
  margin: 0 0 16px;
}

.lede {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 36px;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 16px 24px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.btn--primary {
  background: var(--dopamine);
  color: #fff8f2;
  box-shadow: 0 8px 20px var(--dopamine-glow);
}

.btn--ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  margin-top: 12px;
}

.back-link {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  color: var(--ink-soft);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 20px;
  align-self: flex-start;
}

.catalog-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.catalog-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.catalog-card:active {
  transform: scale(0.98);
}

.catalog-card:hover {
  border-color: var(--terracotta);
}

.catalog-card__icon {
  flex: none;
  width: 28px;
  height: 28px;
  color: var(--dopamine);
}

.catalog-card__icon svg {
  width: 100%;
  height: 100%;
}

.catalog-card__title {
  font-weight: 600;
  font-size: 15.5px;
  margin-bottom: 4px;
}

.catalog-card__meta {
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.4;
}

.catalog-card.is-locked {
  opacity: 0.6;
}

.catalog-card.is-locked .catalog-card__icon {
  color: var(--ink-soft);
}

.q-icon {
  width: 32px;
  height: 32px;
  color: var(--dopamine);
  margin-bottom: 16px;
  animation: reveal-pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.q-icon svg {
  width: 100%;
  height: 100%;
}

.q-count {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.q-text {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.4;
  margin: 0 0 28px;
}

.q-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.q-option {
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-family: "Inter", sans-serif;
  font-size: 15.5px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.q-option:active {
  transform: scale(0.98);
}

.q-option:hover {
  border-color: var(--terracotta);
}

.q-option.is-selected {
  border-color: var(--dopamine);
  background: color-mix(in srgb, var(--dopamine) 12%, var(--bg-soft));
  transform: scale(0.98);
}

.q-option:disabled {
  opacity: 0.45;
  cursor: default;
}

.result-icon {
  position: relative;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  color: var(--terracotta-dark);
  animation: reveal-pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.result-icon::before {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--dopamine-glow) 0%, transparent 70%);
  z-index: -1;
}

.result-icon svg {
  width: 100%;
  height: 100%;
  position: relative;
}

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

.result-title {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 26px;
  margin: 0 0 14px;
}

.result-text {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 32px;
}
