:root {
  --bg: #0d0c0f;
  --card: #16151a;
  --ink: #f4f2ee;
  --dim: #9d99a5;
  --accent: #ffd166;
  --accent-ink: #231f14;
  --line: #2a2830;
  --radius: 14px;
  --max: 620px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: var(--max);
  margin: 0 auto;
  padding: 25px 20px 64px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.brand {
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 20px;
}

.progress {
  height: 3px;
  flex: 1;
  margin-left: 22px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pct, 0%);
  background: var(--accent);
  transition: width .35s ease;
}

.screen { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.hidden { display: none !important; }

h1 {
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 12px;
}

h2 { font-size: 24px; letter-spacing: -0.02em; margin: 0 0 18px; }

.lede { color: var(--dim); font-size: 17px; margin: 0 0 28px; max-width: 46ch; }

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

.qlabel {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.qhint { color: var(--dim); font-size: 15px; margin: -6px 0 10px; }

textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  padding: 14px;
  font: inherit;
  resize: vertical;
  min-height: 84px;
}

textarea:focus, .choice:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.choices { display: flex; flex-wrap: wrap; gap: 8px; }

.choice {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 15px;
  font: inherit;
  cursor: pointer;
}

.choice[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
}

.controls { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }

.btn {
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform .08s ease, opacity .2s ease;
}

.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: default; }

.btn.primary { background: var(--accent); color: var(--accent-ink); }

.btn.ghost {
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--line);
}

.btn.ghost:hover { color: var(--ink); }

.linklike {
  background: none;
  border: 0;
  color: var(--dim);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0;
  text-align: left;
  width: fit-content;
}

.linklike:hover { color: var(--ink); }

.think { display: flex; align-items: center; gap: 14px; color: var(--dim); }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
}

.card h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.015em; }
.card .why { color: var(--dim); font-size: 15px; margin: 0 0 10px; }
.card .shop { color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; display: inline-block; }
.card .shop:hover { text-decoration: underline; }
.card .tag { display: inline-block; font-size: 12px; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; margin-right: 6px; }

.fine { color: #6f6b78; font-size: 13px; margin-top: 26px; }
.result-title { margin-bottom: 22px; }
.result-title span { color: var(--accent); }

@media (max-width: 480px) {
  h1 { font-size: 32px; }
  .qlabel { font-size: 20px; }
}
