/* dog_mom_type_quiz · v2 · 小红书感视觉 */

:root {
  --bg: #FDF6F3;
  --bg-card: #FFFFFF;
  --bg-hook: #FFF2EC;
  --ink: #2B1F1A;
  --ink-soft: #6B5C54;
  --ink-mute: #A89B93;
  --line: #ECDFD7;
  --accent: #E07A5F;       /* 主色 · 暖橘 */
  --accent-deep: #B8553B;
  --accent-soft: #F4C9B4;
  --warm: #E8A87C;
  --shadow: 0 6px 24px rgba(43, 31, 26, .06);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --font: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--font); }
body { line-height: 1.6; font-size: 16px; min-height: 100vh; }

.screen {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  min-height: 100vh;
}

[hidden] { display: none !important; }

/* ===== brand ===== */
.brand {
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--ink-mute);
  text-align: center;
  margin-bottom: 28px;
}
.brand--small { margin-bottom: 16px; font-size: 12px; }
.brand--logo {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
}
.brand--logo img {
  display: block;
  width: 104px;
  height: auto;
}
.brand--logo.brand--small img {
  width: 84px;
}

/* ===== intro ===== */
.intro__avatar {
  width: 118px;
  height: 118px;
  margin: 0 auto 22px;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #f1e5dc;
  box-shadow: var(--shadow);
}
.intro__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.intro__title { text-align: center; margin: 32px 0 16px; line-height: 1.3; }
.intro__title-sub {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 4px;
}
.intro__title-main {
  display: block;
  font-size: 36px;
  font-weight: 800;
  color: var(--ink);
  margin-top: 12px;
  letter-spacing: 1px;
}

.intro__tagline {
  text-align: center;
  font-size: 16px;
  color: var(--ink-soft);
  margin: 24px auto 36px;
  line-height: 1.8;
}

.intro__preview {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 32px 0;
}
.preview-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  box-shadow: var(--shadow);
  line-height: 1.6;
}
.preview-card span {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

.intro__meta {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 32px 0;
  gap: 24px;
  font-size: 14px;
  color: var(--ink-soft);
}
.intro__meta strong { color: var(--accent-deep); font-size: 18px; }

.intro__resume {
  text-align: center;
  font-size: 14px;
  margin-top: 16px;
  color: var(--ink-soft);
}
.intro__resume a { color: var(--accent-deep); font-weight: 600; }

.intro__disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 32px;
  line-height: 1.6;
}

/* ===== buttons ===== */
.btn {
  display: inline-block;
  border: none;
  border-radius: 32px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform .1s, opacity .2s;
  text-decoration: none;
  text-align: center;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn--primary {
  background: var(--accent);
  color: white;
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 24px auto 0;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(224, 122, 95, .3);
}
.btn--ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.btn--hook {
  background: var(--ink);
  color: white;
  display: block;
  width: 100%;
  margin-top: 16px;
  text-decoration: none;
  padding: 14px;
}
.link {
  background: none;
  border: none;
  color: var(--ink-mute);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  font-family: inherit;
}

/* ===== quiz ===== */
.quiz__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--ink-mute);
  font-size: 13px;
}
.quiz__progress-text strong { color: var(--accent-deep); }

.quiz__progress-bar {
  height: 4px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 28px;
}
.quiz__progress-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width .3s ease;
}

.quiz__scene-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.quiz__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 12px;
}
.quiz__hint {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 0 0 24px;
}

.quiz__options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}
.option {
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.6;
  color: var(--ink);
  transition: border-color .2s, background .2s;
  box-shadow: var(--shadow);
}
.option__key {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  background: var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  margin-right: 10px;
  vertical-align: top;
  margin-top: 2px;
}
.option__text { display: inline-block; max-width: calc(100% - 36px); }
.option--selected {
  border-color: var(--accent);
  background: var(--bg-hook);
}
.option--selected .option__key {
  background: var(--accent);
  color: white;
}

.quiz__nav {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.quiz__nav .btn { flex: 1; max-width: none; margin: 0; }

/* ===== loading ===== */
.screen--loading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading__text {
  text-align: center;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* ===== result ===== */
.result-hero {
  background: linear-gradient(160deg, var(--accent-soft), var(--bg-card));
  border-radius: var(--radius-lg);
  padding: 32px 24px 24px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.result-hero__chip {
  display: inline-block;
  padding: 4px 16px;
  background: var(--ink);
  color: var(--bg-card);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.result-hero__name {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: 1px;
}
.result-hero__tagline {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 12px;
  line-height: 1.7;
}
.result-hero__rarity {
  display: inline-block;
  font-size: 12px;
  color: var(--accent-deep);
  background: rgba(255, 255, 255, .6);
  padding: 4px 10px;
  border-radius: 12px;
  margin: 0;
}
.result-hero__actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.result-hero__actions .btn {
  margin: 0; flex: 1; max-width: none;
}

.result-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.result-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
}
.result-card h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--accent);
  margin-right: 10px;
  border-radius: 4px;
}

.result-card p {
  color: var(--ink-soft);
  line-height: 1.8;
  margin: 0 0 10px;
}

.result-exit {
  margin: 8px 0 14px;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.result-exit__title {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.result-exit__sub {
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.result-exit__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.result-exit__actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.result-exit__primary {
  background: var(--ink);
  color: var(--bg-card);
}

.result-exit__secondary {
  border: 1px solid rgba(36, 30, 20, .12);
  background: var(--bg);
  color: var(--ink-soft);
}

@media (max-width: 420px) {
  .result-exit__actions {
    grid-template-columns: 1fr;
  }
}

.result-list { list-style: none; padding: 0; margin: 0; }
.result-list li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 10px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.result-list li::before {
  content: '·';
  position: absolute;
  left: 6px;
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.4;
}

.result-blindspots > div {
  padding: 12px 14px;
  background: var(--bg-hook);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}
.result-blindspots .scene {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-deep);
  margin-bottom: 4px;
}
.result-blindspots .text {
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 14px;
}

.result-portrait {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.result-portrait li {
  background: var(--bg-hook);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* radar */
.radar {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}
.radar__svg { width: 220px; height: 220px; }
.radar__axis { fill: none; stroke: var(--line); stroke-width: 1; }
.radar__axis--inner { stroke-dasharray: 3 3; }
.radar__shape { fill: var(--accent); fill-opacity: .35; stroke: var(--accent); stroke-width: 2; }
.radar__label { font-size: 11px; fill: var(--ink-mute); text-anchor: middle; font-family: var(--font); }

/* hook (主测评钩子) */
.result-card--hook {
  background: var(--bg-hook);
  border: 1px dashed var(--accent);
}
.hook { margin-top: 12px; }
.hook__dogs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.hook__dog {
  background: white;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.hook__dog strong { color: var(--accent-deep); margin-right: 6px; }

/* week try */
.result-card--weektry {
  background: linear-gradient(135deg, #FFFAEC, var(--bg-card));
}

/* tags */
.tag-row {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.tag {
  background: var(--bg-hook);
  color: var(--accent-deep);
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
}

/* feedback */
.result-card--feedback .rating {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 10px 0 6px;
}
.rating button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--line);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
}
.rating button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.rating__hint {
  text-align: center;
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 4px;
}

/* fold */
.result-fold {
  margin-top: 8px;
}
.result-fold summary {
  cursor: pointer;
  text-align: center;
  padding: 14px;
  color: var(--accent-deep);
  font-weight: 600;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  list-style: none;
}
.result-fold summary::-webkit-details-marker { display: none; }
.result-fold[open] summary { margin-bottom: 12px; }

/* ===== share modal ===== */
.modal {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5);
}
.modal__panel {
  position: relative;
  background: var(--bg);
  width: 100%;
  max-width: 560px;
  border-radius: 24px 24px 0 0;
  padding: 20px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal__hint {
  text-align: center;
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.7;
  margin-top: 12px;
}

/* share canvas (用 CSS 渲染分享图，再截屏成 image) */
.share-canvas {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 24px;
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow);
}
.share-canvas img {
  width: 100%; height: 100%; display: block;
}

/* ===== media ===== */
@media (max-width: 380px) {
  .intro__title-main { font-size: 32px; }
  .result-hero__name { font-size: 26px; }
  .quiz__title { font-size: 19px; }
}
