:root {
  --ink: #1a1210;
  --muted: #6b5c54;
  --line: #e5d8cc;
  --paper: #e5dbd0;
  --card: #fff;
  --title: #3f020a;
  --btn: #5c121f;
  --accent: #5c121f;
  --accent-soft: #f3e6e2;
  --score: #fffdf9;
  --result: #f5eee6;
}

* { box-sizing: border-box; margin: 0; }

body {
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 64px;
}

.quiz-lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  margin: 12px 0 8px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  margin: 18px 0;
  box-shadow: 0 8px 28px rgba(42, 24, 20, 0.06);
}

.badge {
  color: var(--title);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.75;
}

h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 26px;
  line-height: 1.2;
  color: var(--title);
  margin: 8px 0 12px;
}

.small { color: var(--muted); font-size: 14px; line-height: 1.55; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.option {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf7f4;
  cursor: pointer;
  font-size: 14px;
}
.option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.option input { accent-color: var(--accent); }

/* Accordion — same idea as I Ching */
.accordion-item {
  border-bottom: 1px solid #eee4e1;
}
.accordion-item:last-of-type { border-bottom: 0; }
.accordion-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.accordion-num {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--title);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.accordion-item.is-done .accordion-num {
  background: var(--btn);
  color: #fff;
}
.accordion-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}
.accordion-meta {
  font-size: 12px;
  color: var(--title);
  font-weight: 700;
  min-width: 2.5em;
  text-align: right;
  opacity: 0.7;
}
.accordion-chev {
  width: 10px;
  height: 10px;
  border-right: 2px solid #9a9092;
  border-bottom: 2px solid #9a9092;
  transform: rotate(45deg);
  transition: transform 0.2s;
  margin-right: 6px;
}
.accordion-item.is-open .accordion-chev {
  transform: rotate(-135deg);
  margin-top: 6px;
}
.accordion-body {
  display: none;
  padding: 0 2px 16px;
}
.accordion-item.is-open .accordion-body { display: block; }
.accordion-hint { margin: 0 0 12px; }
.accordion-next { margin-top: 12px; width: 100%; }

.quiz-actions-bar {
  position: sticky;
  bottom: 8px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(24, 24, 24, 0.08);
}

button, .cta {
  background: var(--btn);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  font: 700 15px/1 "Source Sans 3", system-ui, sans-serif;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
button:hover, .cta:hover { filter: brightness(1.05); }
button:disabled {
  background: #c4b9ba;
  cursor: default;
  filter: none;
}
.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(63, 2, 10, 0.18);
  box-shadow: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.btn-secondary:hover {
  filter: none;
  color: var(--title);
  border-color: rgba(63, 2, 10, 0.35);
  background: rgba(63, 2, 10, 0.04);
}
.quiz-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 22px auto 4px;
  max-width: 432px;
  width: 100%;
}
.quiz-actions .btn-secondary {
  min-width: min(100%, 240px);
  padding: 12px 28px;
}

/* Result card — NailMuse layout */
.result-card {
  width: 100%;
  max-width: 432px;
  margin: 12px auto 0;
  background: var(--result);
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 16px 40px rgba(42, 24, 20, 0.14);
  padding: 28px 28px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}
.brand-rule {
  display: block;
  width: 42px;
  height: 1px;
  background: var(--title);
  opacity: 0.5;
}
.brand-name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.46em;
  text-indent: 0.46em;
  color: var(--title);
  line-height: 1;
}

.title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 30px;
  line-height: 1.05;
  color: var(--title);
  letter-spacing: -0.015em;
}

.nails-band {
  width: 100%;
  margin-top: 18px;
}
.nails-band img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
}

.score {
  width: 100%;
  margin-top: 18px;
  background: var(--score);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(63, 2, 10, 0.06),
    0 10px 28px rgba(42, 24, 20, 0.08);
  padding: 20px 16px 16px;
  text-align: left;
}
.score-head { margin: 0 0 16px; padding: 0 2px; }
.inspire-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--title);
  opacity: 0.7;
}
.inspire-kicker::before,
.inspire-kicker::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(63, 2, 10, 0.14);
}
.inspire {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}
.inspire-name {
  display: block;
  margin-top: 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  font-style: italic;
  line-height: 1.3;
  color: var(--title);
  letter-spacing: -0.01em;
}

.score-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: stretch;
  min-height: 92px;
}
.portrait-wrap {
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(63, 2, 10, 0.08),
    0 6px 16px rgba(42, 24, 20, 0.12);
  background: #ece4da;
  aspect-ratio: 1;
}
.portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
}
.score-notes {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  background: linear-gradient(180deg, #fffefb 0%, #f7f1e8 100%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(63, 2, 10, 0.08);
  padding: 8px 10px;
}
.score-notes img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 76px;
  object-fit: contain;
  border-radius: 4px;
}

.yt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(63, 2, 10, 0.1);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--title);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.yt::before {
  content: "▶";
  font-size: 9px;
  line-height: 1;
  opacity: 0.85;
}
.yt:hover {
  opacity: 0.75;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 16px;
  height: 44px;
  padding: 0;
}

@media (max-width: 650px) {
  .grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .accordion-title { font-size: 15px; }
  .result-card { padding: 22px 18px 28px; }
  .title { font-size: 26px; }
}

@media (min-width: 920px) {
  main { max-width: 960px; }
  .result-card {
    max-width: 864px;
    border-radius: 28px;
    padding: 56px 56px 68px;
  }
  .brand { gap: 10px; margin-bottom: 28px; }
  .brand-rule { width: 72px; }
  .brand-name { font-size: 18px; letter-spacing: 0.48em; text-indent: 0.48em; }
  .title { font-size: 56px; }
  .nails-band { margin-top: 28px; }
  .nails-band img { max-height: 360px; }
  .score { margin-top: 32px; border-radius: 24px; padding: 36px 34px 28px; }
  .score-head { margin: 0 0 26px; }
  .inspire-kicker { font-size: 13px; letter-spacing: 0.28em; margin-bottom: 18px; gap: 16px; }
  .inspire { font-size: 20px; }
  .inspire-name { font-size: 26px; margin-top: 12px; }
  .score-row { grid-template-columns: 168px 1fr; gap: 18px; min-height: 168px; }
  .portrait-wrap { border-radius: 18px; }
  .score-notes { border-radius: 18px; padding: 16px 18px; }
  .score-notes img { max-height: 136px; }
  .yt { margin-top: 20px; font-size: 18px; gap: 10px; }
  .yt::before { font-size: 12px; }
  .cta { margin-top: 28px; height: 72px; font-size: 26px; }
  .quiz-actions { max-width: 864px; margin-top: 32px; }
  .quiz-actions .btn-secondary {
    min-width: 280px;
    height: 52px;
    padding: 0 36px;
    font-size: 18px;
  }
}
