/* ===========================================================
   CATTI · 猫格测试 — styles.css
   极简像素风 · Minimalist Pixel Aesthetic v2
   =========================================================== */

:root {
  --bg: #FFFFFF;
  --surface: #F4F4F4;
  --surface-hover: #EBEBEB;
  --surface-strong: #E8E8E8;
  --border: #E5E5E5;
  --border-soft: #EFEFEF;
  --text: #1A1A1A;
  --text-secondary: #8A8A8A;
  --text-tertiary: #BFBFBF;
  --btn-disabled: #DADADA;
  --btn-active: #1A1A1A;
  --accent: #F4A06B;         /* pixel cat accent orange */

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-pill: 999px;

  --font-body: -apple-system, "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-pixel: "Press Start 2P", "VT323", ui-monospace, "SF Mono", Menlo, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh; min-height: 100dvh;
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, li, figure { margin: 0; padding: 0; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: transparent; color: inherit; }
img { display: block; max-width: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: var(--r-sm); }

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 22px 40px;
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  .app { padding: 32px 24px 56px; }
}

.view { display: none; flex: 1; flex-direction: column; animation: viewFade 0.35s var(--ease-out) both; }
.view.active { display: flex; }
@keyframes viewFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   INTRO
   ========================================================== */
.view-intro {
  justify-content: center;
  text-align: center;
  padding-top: 28px;
  padding-bottom: 40px;
}
.intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* 3-row scrolling pixel pet marquee */
.intro-scroll {
  width: calc(100% + 44px);
  margin: 0 -22px 16px;
  overflow: hidden;
  /* soft fade on edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.scroll-row {
  display: flex;
  gap: 14px;
  width: max-content;
  margin-bottom: 8px;
  animation: scrollLoop 22s linear infinite;
  will-change: transform;
}
.scroll-row:nth-of-type(2) { animation-duration: 28s; }
.scroll-row:nth-of-type(3) { animation-duration: 25s; }
.scroll-row.scroll-reverse { animation-direction: reverse; }
.scroll-row:last-child { margin-bottom: 0; }

.scroll-row .pet {
  flex-shrink: 0;
  width: 96px; height: 96px;
  background: transparent;
  padding: 0;
  display: grid; place-items: center;
}
.scroll-row .pet img {
  width: 100%; height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

@keyframes scrollLoop {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-row { animation: none; }
}

/* BIG pixel title "CatTi" */
.title-pixel {
  font-family: var(--font-pixel);
  font-size: clamp(40px, 11vw, 56px);
  color: var(--text);
  letter-spacing: 0.04em;
  line-height: 1;
  margin-top: 4px;
  text-shadow: 3px 3px 0 var(--accent);
  /* pixel-perfect rendering */
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: auto;
}

.title-sub {
  font-size: clamp(13px, 3.8vw, 15px);
  color: var(--text-secondary);
  margin-top: 4px;
  letter-spacing: 0.02em;
  font-weight: 400;
}

.intro-copy {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: clamp(13px, 3.8vw, 15px);
  margin-top: 12px;
  max-width: 320px;
}
.intro-copy p { margin: 0; }
.intro-copy p + p { margin-top: 4px; }

/* Version badge above title */
.title-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: var(--text);
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  letter-spacing: 0.1em;
  box-shadow: 2px 2px 0 var(--text);
  -webkit-font-smoothing: none;
  animation: badgeWiggle 3.2s var(--ease-out) infinite;
}
@keyframes badgeWiggle {
  0%, 88%, 100% { transform: rotate(0deg) translateY(0); }
  92%           { transform: rotate(-3deg) translateY(-1px); }
  96%           { transform: rotate(3deg)  translateY(-1px); }
}
@media (prefers-reduced-motion: reduce) {
  .title-badge { animation: none; }
}

/* Hero hook — "SBTI 已经过时 / CatTI 来了" */
.intro-hook {
  background: var(--bg);
  border: 2px solid var(--text);
  border-radius: var(--r-md);
  padding: 18px 22px 20px;
  text-align: center;
  box-shadow: 4px 4px 0 var(--text);
  max-width: 340px;
  width: 100%;
  margin-top: 10px;
}
.hook-strike {
  font-size: clamp(13px, 3.6vw, 15px);
  color: var(--text-secondary);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  letter-spacing: 0.05em;
  margin: 0;
  font-weight: 500;
}
.hook-main {
  font-size: clamp(22px, 6.5vw, 28px);
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0.01em;
  margin: 8px 0 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  line-height: 1.1;
}
.hook-main-pixel {
  font-family: var(--font-pixel);
  font-size: clamp(20px, 5.6vw, 24px);
  color: var(--text);
  text-shadow: 2px 2px 0 var(--accent);
  letter-spacing: 0.04em;
  -webkit-font-smoothing: none;
}
.hook-main-zh {
  font-weight: 900;
}

/* Intro slogan — 封面金句 */
.intro-slogan {
  font-size: clamp(15px, 4.2vw, 17px);
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  margin-top: 6px;
  padding: 6px 16px;
  position: relative;
}
.intro-slogan::before,
.intro-slogan::after {
  content: "·";
  color: var(--accent);
  font-weight: 900;
  margin: 0 8px;
  font-size: 20px;
  vertical-align: middle;
}

.intro-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-pill);
  font-size: 16px;
  font-weight: 500;
  padding: 14px 28px;
  min-height: 52px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--btn-active);
  color: #fff;
  width: 100%;
  font-weight: 500;
}
.btn-primary:hover { background: #000; }
.btn-primary:disabled { background: var(--btn-disabled); cursor: not-allowed; }

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  width: 100%;
  border: 2px solid var(--text);
  box-shadow: 4px 4px 0 var(--text);
  font-weight: 600;
  transition: transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out), background 0.18s ease, color 0.18s ease;
}
.btn-secondary:hover {
  background: var(--bg);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--text);
}
.btn-secondary:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--text);
}
.btn-secondary.is-copied {
  background: var(--accent);
  color: var(--text);
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  width: 100%;
  border: none;
  min-height: 44px;
}
.btn-ghost:hover { color: var(--text); }

.btn-lg { font-size: 17px; padding: 16px 36px; min-height: 56px; max-width: 320px; }

.btn-arrow { display: inline-block; transition: transform 0.18s ease; }
.btn:hover:not(:disabled) .btn-arrow { transform: translateX(3px); }
.btn-icon { width: 18px; height: 18px; }

/* Icon button */
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.15s ease;
  flex-shrink: 0;
  color: var(--text);
}
.icon-btn:hover { background: var(--surface-hover); }
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.icon-btn svg { width: 18px; height: 18px; }

/* ==========================================================
   QUIZ
   ========================================================== */
.view-quiz { padding-bottom: 20px; }

.quiz-header {
  display: flex;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  gap: 14px;
}

/* Pixel-boxed progress bar */
.progress-bar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}
.progress-bar {
  flex: 1;
  height: 14px;
  background: var(--bg);
  border: 2px solid var(--text);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  padding: 0;
}
.progress-fill {
  height: 100%;
  background-color: var(--accent);
  background-image: repeating-linear-gradient(90deg, var(--accent) 0 6px, #E09660 6px 12px);
  border-radius: 0;
  transition: width 0.4s var(--ease-out);
  width: 0%;
}
.progress-count {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  flex-shrink: 0;
  -webkit-font-smoothing: none;
}
.progress-count .progress-slash { color: var(--text-tertiary); margin: 0 2px; }
.progress-count #progress-total { color: var(--text-secondary); }

/* Scenario hint — neobrutalism avatar + bubble */
.scenario-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.scenario-avatar {
  width: 64px; height: 64px;
  border-radius: 14px;
  background: var(--bg);
  border: 2px solid var(--text);
  box-shadow: 3px 3px 0 var(--text);
  display: grid; place-items: center;
  padding: 6px;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out);
}
.scenario-avatar.pop {
  animation: avatarPop 0.4s var(--ease-out);
}
@keyframes avatarPop {
  0%   { transform: scale(0.7); opacity: 0; }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
.scenario-avatar img {
  width: 100%; height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.scenario-bubble {
  flex: 1;
  background: var(--bg);
  border: 2px solid var(--text);
  box-shadow: 3px 3px 0 var(--text);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
  min-height: 64px;
  display: flex;
  align-items: center;
  font-weight: 600;
}

/* Quiz card */
.quiz-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}
.quiz-card {
  flex: 1;
  transition: transform 0.28s var(--ease-out), opacity 0.28s ease;
}
.q-text {
  font-size: clamp(22px, 6.2vw, 26px);
  line-height: 1.45;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.option {
  background: var(--bg);
  border: 2px solid var(--text);
  box-shadow: 4px 4px 0 var(--text);
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 0.14s var(--ease-out),
    box-shadow 0.14s var(--ease-out),
    background 0.18s ease,
    color 0.18s ease;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 56px;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.option:hover {
  background: var(--bg);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--text);
}
.option:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--text);
}

/* Clicked feedback: pressed-in look */
.option.flashing {
  background: var(--text);
  color: #fff;
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--text);
}
.option.flashing .option-bullet {
  background: var(--accent);
  color: var(--text);
}
.option.selected {
  background: var(--accent);
  color: var(--text);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--text);
}

.option-bullet {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 4px;
  color: var(--bg);
  background: var(--text);
  display: grid; place-items: center;
  font-family: var(--font-pixel);
  font-size: 10px;
  font-weight: 400;
  transition: inherit;
  -webkit-font-smoothing: none;
  letter-spacing: 0;
}
.option.selected .option-bullet { color: var(--accent); background: var(--text); }

.option-label { flex: 1; padding-top: 1px; font-weight: 500; }

/* Quiz footer: prev / next nav buttons */
.quiz-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: var(--r-pill);
  background: var(--bg);
  border: 2px solid var(--text);
  box-shadow: 3px 3px 0 var(--text);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out), opacity 0.15s ease, color 0.15s ease;
}
.nav-btn:hover:not(:disabled) {
  background: var(--bg);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--text);
}
.nav-btn:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--text);
}
.nav-btn:disabled {
  border-color: var(--btn-disabled);
  box-shadow: 3px 3px 0 var(--btn-disabled);
  color: var(--btn-disabled);
  cursor: not-allowed;
  opacity: 1;
}
.nav-btn svg { width: 16px; height: 16px; }

/* ==========================================================
   RESULT
   ========================================================== */
.view-result { padding-bottom: 40px; }

.result-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.pixel-avatar {
  width: 96px; height: 96px;
  border-radius: 22px;
  background: var(--bg);
  border: 2px solid var(--text);
  box-shadow: 4px 4px 0 var(--accent);
  display: grid; place-items: center;
  overflow: hidden;
  padding: 12px;
}
.pixel-avatar-lg {
  width: 200px; height: 200px;
  border-radius: 28px;
  padding: 16px;
  box-shadow: 6px 6px 0 var(--accent);
}
.pixel-avatar img,
.pixel-avatar svg {
  width: 100%; height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.result-preamble {
  display: inline-block;
  background: var(--text);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  letter-spacing: 0.12em;
  box-shadow: 2px 2px 0 var(--accent);
  -webkit-font-smoothing: none;
  margin-top: 22px;
  margin-bottom: 14px;
}
.result-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  line-height: 1;
}
#result-name-title {
  font-family: var(--font-pixel);
  font-size: clamp(30px, 8vw, 40px);
  color: var(--text);
  text-shadow: 3px 3px 0 var(--accent);
  letter-spacing: 0.04em;
  -webkit-font-smoothing: none;
  line-height: 1;
}
#result-name {
  font-size: clamp(20px, 5.6vw, 26px);
  font-weight: 900;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.result-meta {
  background: var(--bg);
  border: 2px solid var(--text);
  box-shadow: 3px 3px 0 var(--text);
  border-radius: 12px;
  padding: 10px 16px;
  max-width: 280px;
  margin: 14px auto 18px;
  gap: 4px;
  display: flex;
  flex-direction: column;
}
.result-meta-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}
.result-meta-row dt {
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  font-weight: 600;
}
.result-meta-row dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}
.result-slogan {
  font-size: clamp(14px, 4vw, 16px);
  color: var(--text);
  line-height: 1.5;
  font-weight: 600;
  margin: 6px 8px 0;
}

.result-quote {
  background: var(--bg);
  border: 2px solid var(--text);
  box-shadow: 4px 4px 0 var(--accent);
  border-radius: 14px;
  padding: 20px 22px 20px 46px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  margin: 24px 0;
  position: relative;
  font-weight: 500;
}
.result-quote::before {
  content: "“";
  position: absolute;
  left: 18px; top: 6px;
  font-size: 34px;
  color: var(--accent);
  line-height: 1;
  font-family: serif;
  font-weight: 900;
}

.result-section-title {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: 0.1em;
  font-weight: 800;
  text-transform: none;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
  line-height: 1.3;
}

.result-tags {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}
.tag {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--text);
  box-shadow: 3px 3px 0 var(--text);
  padding: 14px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tagFade 0.4s var(--ease-out) both;
}
.tag:nth-child(2n) {
  box-shadow: 3px 3px 0 var(--accent);
}
.tag:nth-child(1) { animation-delay: 0.05s; }
.tag:nth-child(2) { animation-delay: 0.12s; }
.tag:nth-child(3) { animation-delay: 0.19s; }
.tag:nth-child(4) { animation-delay: 0.26s; }
@keyframes tagFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Highlight cards — 恋爱脑 · 内耗 */
.highlight-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.highlight-card {
  background: var(--bg);
  border: 2px solid var(--text);
  border-radius: 14px;
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  min-height: 136px;
}
.highlight-card-md { box-shadow: 4px 4px 0 var(--accent); }
.highlight-card-nz { box-shadow: 4px 4px 0 var(--text); }

.highlight-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.highlight-card-value {
  font-family: var(--font-pixel);
  font-size: clamp(28px, 7vw, 36px);
  color: var(--text);
  text-shadow: 3px 3px 0 var(--accent);
  letter-spacing: 0.04em;
  -webkit-font-smoothing: none;
  line-height: 1;
  margin: 2px 0 10px;
}
.highlight-card-nz .highlight-card-value {
  text-shadow: 3px 3px 0 #BFBFBF;
}
.highlight-card-note {
  font-size: 11px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.45;
  max-width: 140px;
}

/* Radar chart */
.radar-wrap {
  background: var(--bg);
  border: 2px solid var(--text);
  box-shadow: 4px 4px 0 var(--text);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 28px;
  display: grid;
  place-items: center;
}
.radar-wrap canvas {
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 1 / 1;
  image-rendering: auto;
}

/* Inline share image block */
.share-image-block {
  margin-bottom: 28px;
}
.share-image-frame {
  background: var(--bg);
  border: 2px solid var(--text);
  box-shadow: 4px 4px 0 var(--text);
  border-radius: 14px;
  padding: 12px;
  min-height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.share-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
}
.share-image-placeholder p { margin: 0; }
.spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.share-image-error {
  color: var(--text-secondary);
  font-size: 13px;
  padding: 40px 20px;
  text-align: center;
}

.share-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  /* hint for long-press save on iOS */
  -webkit-touch-callout: default;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.share-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.result-divider {
  height: 4px;
  background: none;
  background-image: repeating-linear-gradient(90deg, var(--text) 0 6px, transparent 6px 12px);
  background-repeat: repeat-x;
  background-position: center;
  margin: 28px auto;
  max-width: 160px;
  border: 0;
}
.result-interpretation {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 32px;
  letter-spacing: 0.005em;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Xiaohongshu author promo */
.xhs-promo {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  border: 2px solid var(--text);
  box-shadow: 4px 4px 0 var(--accent);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  margin-top: 14px;
  transition:
    transform 0.14s var(--ease-out),
    box-shadow 0.14s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.xhs-promo:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--accent);
}
.xhs-promo:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--accent);
}
.xhs-badge {
  flex-shrink: 0;
  background: #FF2442;
  color: #fff;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 0.1em;
  box-shadow: 2px 2px 0 var(--text);
  -webkit-font-smoothing: none;
}
.xhs-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.35;
}
.xhs-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.xhs-sub {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}
.xhs-arrow {
  flex-shrink: 0;
  font-size: 18px;
  color: var(--text-secondary);
  transition: transform 0.18s var(--ease-out), color 0.18s ease;
  font-weight: 700;
}
.xhs-promo:hover .xhs-arrow {
  color: var(--text);
  transform: translateX(3px);
}
.result-footer-note {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  text-align: center;
}

/* ==========================================================
   SHARE CARD (offscreen, rendered to image on demand)
   ========================================================== */
.share-card-wrap {
  position: fixed;
  left: -9999px;
  top: 0;
  pointer-events: none;
  opacity: 0;
}
.share-card-wrap.visible {
  left: auto; right: -9999px;
  opacity: 1;
}

/* Share card · 9:16 portrait · single column · neobrutalism */
.share-card {
  width: 720px;
  height: 1280px;
  background: #FFFFFF;
  font-family: var(--font-body);
  color: var(--text);
  box-sizing: border-box;
  padding: 40px 44px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  overflow: hidden;
}

.share-card .sc-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}
.share-card .sc-logo {
  font-family: var(--font-pixel);
  font-size: 46px;
  color: var(--text);
  letter-spacing: 0.04em;
  text-shadow: 3px 3px 0 var(--accent);
}
.share-card .sc-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  font-weight: 600;
}

.share-card .sc-avatar-wrap {
  width: 360px;
  height: 360px;
  margin: 6px auto 8px;
  background: #FFFFFF;
  border: 2px solid var(--text);
  box-shadow: 6px 6px 0 var(--accent);
  border-radius: 30px;
  padding: 10px;
  box-sizing: border-box;
  display: grid; place-items: center;
}
.share-card .sc-avatar-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.share-card .sc-preamble {
  display: inline-block;
  background: var(--text);
  color: #FFFFFF;
  font-family: var(--font-pixel);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  letter-spacing: 0.12em;
  box-shadow: 2px 2px 0 var(--accent);
  margin-top: 4px;
}
.share-card .sc-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  gap: 8px;
  margin-top: 4px;
}
.share-card #sc-name-title {
  font-family: var(--font-pixel);
  font-size: 44px;
  color: var(--text);
  text-shadow: 3px 3px 0 var(--accent);
  letter-spacing: 0.04em;
  line-height: 1;
}
.share-card #sc-name {
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.share-card .sc-meta-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px auto 0;
  padding: 12px 18px;
  background: #FFFFFF;
  border: 2px solid var(--text);
  box-shadow: 3px 3px 0 var(--text);
  border-radius: 12px;
  max-width: 320px;
}
.share-card .sc-meta-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 12px;
  font-size: 15px;
  margin: 0;
}
.share-card .sc-meta-row dt {
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  font-weight: 600;
}
.share-card .sc-meta-row dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.share-card .sc-slogan {
  font-size: 20px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.4;
  padding: 4px 0;
}

.share-card .sc-punchline-block {
  width: 100%;
  background: #FFFFFF;
  border: 2px solid var(--text);
  box-shadow: 5px 5px 0 var(--accent);
  border-radius: 16px;
  padding: 22px 26px;
  text-align: left;
  box-sizing: border-box;
}
.share-card .sc-punchline-label {
  display: inline-block;
  background: var(--accent);
  color: var(--text);
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  letter-spacing: 0.12em;
  box-shadow: 2px 2px 0 var(--text);
  margin-bottom: 12px;
}
.share-card .sc-punchline {
  margin: 0;
  font-size: 26px;
  color: var(--text);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.005em;
  position: relative;
  padding-left: 32px;
}
.share-card .sc-punchline::before {
  content: "“";
  position: absolute;
  left: 0; top: -8px;
  font-size: 50px;
  color: var(--accent);
  font-family: serif;
  line-height: 1;
  font-weight: 900;
}

.share-card .sc-tags-block {
  width: 100%;
  box-sizing: border-box;
  background: #FFFFFF;
  border: 2px solid var(--text);
  box-shadow: 5px 5px 0 var(--text);
  border-radius: 16px;
  padding: 18px 20px 20px;
  text-align: left;
}
.share-card .sc-tags-label {
  display: inline-block;
  background: var(--text);
  color: #FFFFFF;
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.share-card .sc-tags-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.share-card .sc-tag-item {
  background: var(--accent);
  border: 2px solid var(--text);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  box-shadow: 2px 2px 0 var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.share-card .sc-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 14px;
  width: 100%;
  border-top: 2px dashed var(--text);
}
.share-card .sc-url-badge {
  background: var(--text);
  color: #FFFFFF;
  font-family: var(--font-pixel);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  letter-spacing: 0.14em;
  box-shadow: 2px 2px 0 var(--accent);
}
.share-card .sc-url-text {
  font-size: 17px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
