/* ---- 奶油色画布与独立产品视觉 ---- */
:root {
  color-scheme:light;
  --cream:#fff7ec;
  --pink:#ff5b87;
  --orange:#ff995c;
  --ink:#493a35;
  --muted:#9c8881;
  --border:#ffe5d9;
  --shadow:0 12px 36px #ff988b12;
  font-family:ui-rounded,"PingFang TC","Microsoft JhengHei",system-ui,sans-serif;
  color:var(--ink);
  background:var(--cream);
  font-synthesis:none;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  min-height:100vh;
  background:radial-gradient(ellipse at 100% 10%,#ffe6ed99,transparent 42%),radial-gradient(ellipse at 0 80%,#fff0d7,transparent 42%);
  font-size:16px;
  line-height:1.65;
}
button,input,a {
  -webkit-tap-highlight-color:transparent;
}
button,input {
  font:inherit;
}
button,a {
  touch-action:manipulation;
}
button {
  cursor:pointer;
}
button:disabled {
  cursor:wait;
  opacity:.65;
}
a {
  color:inherit;
}
button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible {
  outline:3px solid #c266d5;
  outline-offset:4px;
}
h1,h2,h3,p {
  margin:0 0 16px;
}
h1 {
  font-size:34px;
  line-height:1.55;
  letter-spacing:.025em;
  overflow-wrap:anywhere;
}
h2 {
  font-size:23px;
  line-height:1.5;
  overflow-wrap:anywhere;
}
h3 {
  font-size:18px;
}
input[type=text] {
  display:block;
  width:100%;
  border:2px solid var(--border);
  border-radius:16px;
  background:#fffcfa;
  padding:16px;
  text-align:center;
  font-size:20px;
  color:var(--ink);
  margin:24px 0;
}
input[type=checkbox] {
  accent-color:var(--pink);
  width:18px;
  height:18px;
  flex-shrink:0;
}
.brand {
  text-align:center;
  padding:22px 16px 20px;
}
.brand a {
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  font-size:25px;
  font-weight:800;
  letter-spacing:.06em;
}
.brand-icon {
  display:inline-grid;
  place-items:center;
  background:#ffefd4;
  border-radius:14px;
  width:43px;
  height:43px;
  font-size:27px;
  box-shadow:0 5px 16px #f9bcbc33;
}
.hearts {
  font-size:26px;
  color:var(--pink);
  transform:rotate(-17deg);
  align-self:center;
  line-height:1;
  margin-left:0;
}
main {
  max-width:640px;
  margin:auto;
  padding:0 20px;
  outline:none;
}
.card {
  background:#fff;
  border:1px solid var(--border);
  border-radius:28px;
  padding:30px 24px;
  margin-bottom:18px;
  text-align:center;
  box-shadow:var(--shadow);
}
.muted,.eyebrow {
  color:var(--muted);
}
.small {
  font-size:13px;
}
.eyebrow {
  font-size:14px;
}
.mascot {
  font-size:56px;
  border-radius:28px;
  background:#fff0d5;
  width:102px;
  height:102px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  line-height:1;
  white-space:nowrap;
  margin:0 auto 20px;
  position:relative;
}

.hero-title {
  font-size:39px;
  margin-bottom:12px;
}
.hero-sub {
  font-size:18px;
  font-weight:600;
  color:var(--muted);
  line-height:1.9;
}
.genres {
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:9px;
  margin:22px 0;
}
.pill {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:2px solid color-mix(in srgb,var(--genre,var(--pink)) 35%,white);
  background:color-mix(in srgb,var(--genre,var(--pink)) 8%,white);
  border-radius:99px;
  padding:6px 13px;
  font-size:14px;
  gap:5px;
}
.btn {
  border:2px solid var(--border);
  border-radius:99px;
  background:white;
  color:var(--ink);
  min-height:48px;
  padding:11px 22px;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  text-decoration:none;
  gap:8px;
  font-weight:700;
  line-height:1.4;
}
.primary {
  background:linear-gradient(110deg,var(--pink),var(--orange));
  border:0;
  color:white;
  box-shadow:0 12px 24px #ff5b8730;
}
.wide {
  width:100%;
  margin-top:12px;
}
.large {
  min-height:60px;
  font-size:20px;
}
.outline {
  color:var(--pink);
  border-color:var(--pink);
}
.text-btn {
  border:0;
  background:transparent;
  color:var(--muted);
  text-decoration:underline;
  padding:10px;
  margin-top:8px;
}
.row {
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
  margin:12px 0;
}
.row>* {
  min-width:0;
  flex:1;
}
.line {
  background:#51be61;
  border:0;
  color:white;
}
.x {
  background:#202020;
  border:0;
  color:white;
}
.link-box {
  border:2px dashed var(--border);
  background:#fff8f0;
  border-radius:15px;
  padding:13px;
  overflow-wrap:anywhere;
  font-size:14px;
  margin:20px 0 12px;
  user-select:all;
}
.steps {
  list-style:none;
  padding:0;
  margin:0;
  text-align:left;
  counter-reset:steps;
}
.steps li {
  display:flex;
  gap:14px;
  padding:10px 0;
  align-items:center;
}
.steps li:before {
  counter-increment:steps;
  content:counter(steps);
  background:#ffeff2;
  color:var(--pink);
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:50%;
  flex-shrink:0;
  font-weight:800;
}
.history {
  display:grid;
  gap:10px;
  text-align:left;
}
.history a {
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:14px;
  border-radius:14px;
  background:#fff8f1;
  text-decoration:none;
}
.count-list {
  display:grid;
  gap:12px;
  margin:24px 0;
}
.count {
  display:flex;
  align-items:center;
  gap:15px;
  text-align:left;
  background:#fffaf5;
  border:2px solid var(--border);
  border-radius:18px;
  padding:15px 18px;
  color:var(--ink);
}
.count strong {
  font-size:26px;
  min-width:84px;
  color:var(--pink);
}
.count span {
  font-size:14px;
}
.count em {
  font-size:12px;
  font-style:normal;
  background:var(--pink);
  color:white;
  border-radius:30px;
  padding:3px 9px;
  margin-left:auto;
}
.filter {
  display:flex;
  align-items:flex-start;
  text-align:left;
  gap:8px;
  font-size:13px;
  color:var(--muted);
}
.progress {
  display:flex;
  gap:12px;
  align-items:center;
  margin:8px 12px 16px;
  font-size:14px;
  color:var(--muted);
}
progress {
  appearance:none;
  flex:1;
  min-width:0;
  height:10px;
  border:0;
  background:#fbe3d3;
  border-radius:99px;
  overflow:hidden;
}
progress::-webkit-progress-bar {
  background:#fbe3d3;
}
progress::-webkit-progress-value {
  background:linear-gradient(90deg,var(--pink),var(--orange));
  border-radius:99px;
}
progress::-moz-progress-bar {
  background:var(--pink);
}
.question {
  padding:25px 22px 24px;
}
.question .pill {
  margin-bottom:16px;
}
.question h2 {
  font-size:25px;
  min-height:42px;
  margin:12px 0 24px;
}
.option {
  width:100%;
  border:2px solid #f2ddce;
  border-radius:18px;
  background:#fffdfb;
  min-height:78px;
  padding:18px;
  font-size:21px;
  color:var(--ink);
  box-shadow:0 2px 0 #f8eee5;
  transition:border-color .15s,background .15s;
}
.option:hover:not(:disabled) {
  border-color:var(--pink);
  background:#fff4f7;
}
.option.selected {
  border-color:var(--pink);
  background:#fff0f5;
}
.option.selected:disabled,
.option.correct:disabled {
  opacity:1;
}
.option.correct {
  border-color:#68c395;
  background:#edfbf2;
}
.option.incorrect {
  border-color:#eb2352;
  background:#fff1f2;
}
.vs {
  color:var(--pink);
  font-size:13px;
  padding:6px;
}
.feedback {
  font-weight:700;
  margin:18px 0 0;
}
.feedback.good {
  color:#389968;
}
.feedback.bad {
  color:#e91e4d;
}
.error {
  color:#c64665;
  background:#fff0f3;
  padding:12px;
  border-radius:12px;
  margin-top:16px;
}
.notice {
  position:fixed;
  bottom:20px;
  left:50%;
  transform:translateX(-50%);
  background:#493a35;
  color:white;
  border-radius:18px;
  padding:12px 22px;
  max-width:90vw;
  text-align:center;
  z-index:5;
  box-shadow:0 8px 30px #493a3522;
}
.celebrate {
  font-size:54px;
  margin:0 0 10px;
}
.score-ring {
  --percent:0;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:conic-gradient(var(--pink) calc(var(--percent)*1%),#ffebdf 0);
  width:194px;
  height:194px;
  margin:18px auto 24px;
  padding:17px;
}
.score-inner {
  display:flex;
  flex-direction:column;
  justify-content:center;
  border-radius:50%;
  background:white;
  width:100%;
  height:100%;
}
.score-inner strong {
  font-size:48px;
  line-height:1.2;
}
.score-inner small {
  font-size:21px;
  font-weight:400;
}
.score-inner span {
  font-size:21px;
  color:var(--pink);
  font-weight:800;
}
.radar {
  display:block;
  width:100%;
  max-width:410px;
  margin:8px auto;
  overflow:visible;
}
.radar text {
  fill:var(--ink);
  font-size:12px;
}
.legend {
  display:flex;
  justify-content:center;
  gap:20px;
  font-size:13px;
  color:var(--muted);
  margin:12px;
}
.legend i {
  display:inline-block;
  width:9px;
  height:9px;
  background:var(--pink);
  border-radius:50%;
  margin-right:4px;
}
.legend .average {
  background:#a897db;
}
.table-wrap {
  overflow-x:auto;
}
table {
  width:100%;
  border-collapse:collapse;
  text-align:left;
  font-size:14px;
}
th {
  color:var(--muted);
  font-size:12px;
  font-weight:500;
}
td,th {
  padding:11px 5px;
  border-bottom:1px solid #ffefe7;
}
td:first-child {
  overflow-wrap:anywhere;
}
td:not(:first-child),th:not(:first-child) {
  text-align:right;
  white-space:nowrap;
}
.rank td:first-child {
  width:38px;
  text-align:center;
}
.rank td:nth-child(2) {
  text-align:left;
  white-space:normal;
  overflow-wrap:anywhere;
}
.rank td:last-child {
  color:var(--pink);
  font-weight:700;
}
.stat-grid {
  display:flex;
  gap:12px;
  justify-content:center;
  margin:18px 0;
}
.stat {
  background:#fff6ed;
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px;
  flex:1;
}
.stat strong {
  display:block;
  font-size:30px;
  line-height:1.3;
  color:var(--pink);
}
.stat span {
  font-size:13px;
  color:var(--muted);
}
details {
  text-align:left;
  margin-top:16px;
}
summary {
  cursor:pointer;
  color:var(--muted);
  padding:10px 0;
}
.review-item {
  padding:14px 0;
  border-bottom:1px solid var(--border);
  font-size:14px;
}
.review-item strong {
  display:block;
  margin-bottom:6px;
}
.review-item span {
  color:var(--muted);
}
footer {
  text-align:center;
  color:var(--muted);
  font-size:12px;
  padding:20px 18px 34px;
}
footer p {
  margin:0 0 4px;
}
footer a {
  text-underline-offset:3px;
}
[hidden] {
  display:none!important;
}
@media(max-width:480px) {
  .brand {
    padding-top:16px;
  }
  .brand a {
    font-size:22px;
  }
  main {
    padding:0 14px;
  }
  .card {
    padding:25px 19px;
    border-radius:24px;
  }
  h1,.hero-title {
    font-size:30px;
  }
  .hero-sub {
    font-size:15px;
  }
  .genres {
    gap:7px;
  }
  .pill {
    font-size:12px;
    padding:5px 10px;
  }
  .count {
    padding:14px 12px;
    gap:10px;
  }
  .count strong {
    font-size:24px;
    min-width:74px;
  }
  .count span {
    font-size:12px;
  }
  .count em {
    padding:3px 6px;
    white-space:nowrap;
  }
  .option {
    font-size:19px;
    min-height:78px;
  }
  .question h2 {
    font-size:23px;
  }
  .row .btn {
    padding:12px;
    font-size:14px;
  }
  .filter {
    font-size:12px;
  }
  .score-ring {
    width:176px;
    height:176px;
  }
  .stat strong {
    font-size:26px;
  }
  td,th {
    font-size:12px;
  }
  .hero .mascot {
    width:90px;
    height:90px;
    font-size:50px;
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    transition:none!important;
    scroll-behavior:auto!important;
  }
}

/* ---- Rikaido 静态介绍与问答：仅首页显示，不打断答题 ---- */
.rikaido-guide { max-width: 640px; margin: auto; padding: 0 20px; }
.rikaido-about > p:not(.eyebrow), .rikaido-faq details p { text-align: left; color: var(--muted); font-size: 15px; line-height: 1.9; }
.rikaido-highlights { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.rikaido-highlights span { background: #fff5ef; border: 1px solid var(--border); border-radius: 14px; padding: 8px 12px; font-size: 13px; }
.rikaido-faq details { margin: 0; border-bottom: 1px solid var(--border); }
.rikaido-faq details:last-child { border-bottom: 0; }
.rikaido-faq summary { color: var(--ink); font-weight: 700; padding: 17px 0; font-size: 15px; }
.rikaido-faq details[open] summary { color: #c45274; }
.rikaido-faq details p { margin-bottom: 20px; }
.rikaido-more a { color: #c45274; text-underline-offset: 4px; }
@media (max-width: 480px) { .rikaido-guide { padding: 0 14px; } }

.rikaido-question { font-size: clamp(22px, 5vw, 28px); font-weight: 700; line-height: 1.5; margin: 0 0 18px; }

/* ---- 本地图像与矢量图标：固定尺寸，避免字体图标溢出 ---- */
img.mascot { display:block; object-fit:cover; aspect-ratio:1; }
img.brand-icon { object-fit:cover; aspect-ratio:1; }
.rikaido-icon { display:inline-block; width:1.2em; height:1.2em; flex:none; vertical-align:-.2em; }
.brand .rikaido-icon { color:var(--pink); width:28px; height:28px; }
.celebrate { color:var(--pink); }
.celebrate .rikaido-icon { width:54px; height:54px; }
.rikaido-highlights > span { display:inline-flex; align-items:center; gap:6px; }
.rank-medal { display:inline-grid; place-items:center; width:28px; height:28px; border-radius:50%; font-weight:800; }
.rank-1 { color:#976413; background:#fff0c5; }
.rank-2 { color:#647080; background:#edf0f5; }
.rank-3 { color:#a36542; background:#ffeadb; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ---- 三平台分享：桌面三列，窄屏 Threads 独占一行 ---- */
.share-social { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.share-social .btn { min-width:0; padding:12px 10px; font-size:14px; }
.threads { background:#fff4f7; border-color:#edbccb; color:#754b5a; }
@media(max-width:480px) { .share-social { grid-template-columns:repeat(2,minmax(0,1fr)); } .share-social .threads { grid-column:1 / -1; } }

/* ---- 作答反馈：按钮缩放、错误晃动、文字向下滑入 ---- */
.answer-feedback:empty { display:none; }
.answer-feedback { font-size:20px; overflow-wrap:anywhere; }
.answer-pop { animation:answer-pop .38s ease-out both; }
.answer-shake { animation:answer-shake .42s ease-in-out; }
.feedback-enter { animation:feedback-enter .35s ease-out both; }
@keyframes answer-pop {
  0%,100% { transform:scale(1); }
  45% { transform:scale(1.025); }
  75% { transform:scale(.99); }
}
@keyframes answer-shake {
  0%,100% { transform:translateX(0); }
  20%,60% { transform:translateX(-7px); }
  40%,80% { transform:translateX(7px); }
}
@keyframes feedback-enter {
  from { opacity:0; transform:translateY(-12px); }
  to { opacity:1; transform:translateY(0); }
}
@media (prefers-reduced-motion:reduce) {
  .answer-pop,.answer-shake,.feedback-enter { animation:none; }
}

/* ---- 本地测验历史：长昵称与状态在窄屏自然换行 ---- */
.history a { flex-wrap:wrap; gap:8px 16px; overflow-wrap:anywhere; }
.history a span:first-child { min-width:0; }
.history a span:last-child { font-size:14px; color:#9c8881; }
