/* ===========================
   心测坊 · 专业测评报告站
   =========================== */

:root {
  --bg: #f2f4f7;
  --bg-2: #e7ebf0;
  --surface: #ffffff;
  --ink: #122033;
  --ink-2: #4d5d70;
  --ink-3: #7b8898;
  --navy: #0d2137;
  --navy-2: #16324f;
  --primary: #1a4d6d;
  --primary-deep: #12384f;
  --primary-soft: #e7f0f6;
  --accent: #9a7b4f;
  --accent-deep: #7a6039;
  --accent-soft: #f5efe6;
  --line: #d7dde5;
  --line-strong: #c3ccd7;
  --shadow: 0 1px 2px rgba(13, 33, 55, 0.04), 0 12px 32px rgba(13, 33, 55, 0.06);
  --shadow-lg: 0 20px 50px rgba(13, 33, 55, 0.12);
  --r: 14px;
  --r-sm: 8px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-display: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "STSong", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
}
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
  max-width: 100%;
  width: 100%;
  position: relative;
}
img, svg, video { max-width: 100%; height: auto; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-deep); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
ul, ol { list-style: none; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  min-width: 0;
}
.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  min-width: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(215, 221, 229, 0.9);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.brand:hover { color: var(--primary); }
.brand em {
  font-style: normal;
  color: var(--accent);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-desktop a {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.nav-desktop a:hover { color: var(--ink); background: var(--bg-2); }
.nav-desktop a.cur {
  color: var(--navy);
  background: var(--accent-soft);
  font-weight: 600;
}
.nav-desktop .nav-share {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.nav-desktop .nav-share:hover {
  color: var(--ink);
  background: var(--bg-2);
}
body.is-home .nav-desktop .nav-share {
  color: rgba(255, 255, 255, 0.78);
}
body.is-home .nav-desktop .nav-share:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* 手机抽屉（挂在 body 下，避免被 header 裁切） */
.nav-mask {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(8, 21, 33, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.nav-mask.show { opacity: 1; }
.nav-drawer {
  display: none;
  /* 桌面隐藏；手机端见 media query，关闭时不可撑出横向滚动 */
}
.nav-drawer-search {
  display: none;
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  width: 220px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.header-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 77, 109, 0.1);
  background: #fff;
}
.header-search input {
  border: 0;
  background: transparent;
  outline: none;
  padding: 9px 16px;
  width: 100%;
  font-size: 13px;
  color: var(--ink);
}
.header-search input::placeholder { color: var(--ink-3); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  padding: 0;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
body.nav-open .nav-toggle span:nth-child(1) {
  top: 20px;
  transform: rotate(45deg);
}
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) {
  top: 20px;
  transform: rotate(-45deg);
}

.main {
  min-height: calc(100vh - 180px);
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  min-width: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn:hover { background: var(--primary-deep); color: #fff; }
.btn.lg { padding: 14px 28px; font-size: 15px; border-radius: 10px; }
.btn.ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn.ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.btn.accent {
  background: var(--accent);
  color: #fff;
}
.btn.accent:hover { background: var(--accent-deep); color: #fff; }
.btn.disabled,
.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ---------- Home ---------- */
body.is-home .site-header {
  position: absolute;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}
body.is-home .brand { color: #fff; }
body.is-home .brand em { color: #f0d9a8; }
body.is-home .brand:hover { color: #fff; }
body.is-home .nav-desktop a { color: rgba(255,255,255,0.78); }
body.is-home .nav-desktop a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
body.is-home .nav-desktop a.cur {
  color: #fff;
  background: rgba(255,255,255,0.14);
}
body.is-home .header-search {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.22);
}
body.is-home .header-search input { color: #fff; }
body.is-home .header-search input::placeholder { color: rgba(255,255,255,0.5); }
body.is-home .nav-toggle {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
}
body.is-home .nav-toggle span { background: #fff; }
body.is-home.nav-open .site-header {
  background: #0d2137;
}

.home-hero {
  position: relative;
  min-height: min(92vh, 760px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}
.home-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 70% 0%, rgba(154, 123, 79, 0.28), transparent 55%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(47, 126, 163, 0.35), transparent 50%),
    linear-gradient(160deg, #081521 0%, #0d2137 42%, #1a3f5c 100%);
}
.home-hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 65% 60% at 40% 45%, #000 10%, transparent 72%);
  animation: gridDrift 18s linear infinite;
}
.home-hero-bg::after {
  content: "";
  position: absolute;
  right: -12%;
  top: 8%;
  width: 58%;
  height: 90%;
  background:
    radial-gradient(circle at 35% 40%, rgba(240, 217, 168, 0.16), transparent 42%),
    radial-gradient(circle at 70% 70%, rgba(255,255,255,0.08), transparent 50%);
  filter: blur(4px);
  animation: drift 16s ease-in-out infinite alternate;
}
.home-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 120px 0 96px;
}
.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 96px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.05;
  margin-bottom: 20px;
}
.home-hero .lead {
  font-size: clamp(17px, 2.4vw, 20px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  max-width: 18em;
  margin-bottom: 36px;
  font-weight: 500;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.hero-actions .btn.lg { min-width: 148px; }
.hero-actions .btn.ghost {
  border-color: rgba(255,255,255,0.4);
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.hero-actions .btn.ghost:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.65);
  color: #fff;
}

.home-find {
  margin-top: -36px;
  position: relative;
  z-index: 2;
  padding: 0 0 8px;
}
.home-find .container {
  display: flex;
  justify-content: center;
}
.home-find-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px 24px;
  box-shadow: var(--shadow-lg);
  max-width: 640px;
  width: 100%;
  text-align: center;
}
.home-find-label {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  text-align: center;
}
.home-find-bar {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}
.home-find-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 77, 109, 0.12);
  background: #fff;
}
.home-find-bar input {
  flex: 1;
  border: 0;
  outline: none;
  padding: 14px 16px;
  background: transparent;
  font-size: 15px;
  min-width: 0;
  text-align: left;
}
.home-find-bar button {
  border: 0;
  background: var(--navy);
  color: #fff;
  padding: 0 22px;
  font-weight: 700;
  cursor: pointer;
}
.home-find-bar button:hover { background: var(--primary); }

.dir-list {
  display: grid;
  border-top: 1px solid var(--line);
}
.dir-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  transition: background 0.2s, padding-left 0.2s;
  max-width: 100%;
}
.dir-row:hover {
  background: rgba(26, 77, 109, 0.04);
  padding-left: 10px;
  color: inherit;
}
.dir-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}
.dir-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}
.dir-go {
  font-size: 18px;
  color: var(--accent-deep);
  font-weight: 700;
}

.home-featured {
  background:
    linear-gradient(180deg, #e8eef4 0%, var(--bg) 40%, var(--bg) 100%);
}
.home-popular { padding-top: 48px; }
.test-grid-compact { grid-template-columns: repeat(4, 1fr); }

.home-close {
  padding: 72px 0;
  background:
    radial-gradient(ellipse 50% 80% at 100% 50%, rgba(154,123,79,0.12), transparent 50%),
    linear-gradient(135deg, #0d2137 0%, #16324f 100%);
  color: #fff;
}
.home-close-inner {
  max-width: 560px;
  text-align: left;
}
.home-close h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
}
.home-close p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 28px;
  font-size: 16px;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-22px, 28px) scale(1.06); }
}
@keyframes gridDrift {
  from { background-position: 0 0; }
  to { background-position: 72px 72px; }
}

/* ---------- Sections ---------- */
.section {
  padding: 64px 0;
}
.section.alt {
  background: linear-gradient(180deg, #eef1f5 0%, var(--bg) 100%);
}
.sec-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.sec-head h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.sec-head p {
  color: var(--ink-3);
  font-size: 14px;
  margin-top: 6px;
}
.sec-head a {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}
.sec-head a:hover { color: var(--accent-deep); }

/* ---------- Category chips / tiles ---------- */
.cat-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  max-width: 100%;
  min-width: 0;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.cat-scroll a {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.cat-scroll a:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: var(--primary);
}
.cat-scroll .cat-num {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cat-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  overflow: hidden;
}
.cat-tile:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.cat-tile a {
  display: block;
  padding: 26px 24px;
  color: inherit;
  min-height: 160px;
  background:
    linear-gradient(135deg, var(--primary-soft) 0%, transparent 55%);
}
.cat-name {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.cat-desc {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 18px;
}
.cat-tile .cat-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-deep);
  letter-spacing: 0.04em;
}

/* ---------- Test cards ---------- */
.test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.test-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.25s;
  overflow: hidden;
}
.test-card:hover {
  border-color: rgba(26, 77, 109, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.test-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px 22px 20px;
  color: inherit;
}
.test-card-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 10px;
}
.test-card-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy);
  margin-bottom: 8px;
}
.test-card-desc {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}
.test-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 12px;
  color: var(--ink-3);
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-bottom: 14px;
}
.test-card-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}
.test-card:hover .test-card-cta { color: var(--accent-deep); }

/* ---------- Page chrome ---------- */
/* 只用上下 padding，避免覆盖 .container 的左右边距 */
.page {
  padding-top: 40px;
  padding-bottom: 72px;
}
.page-head {
  margin-bottom: 28px;
  max-width: 720px;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin-bottom: 10px;
}
.page-head p { color: var(--ink-2); font-size: 15px; }
.crumb {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.crumb a { color: var(--ink-2); }
.crumb a:hover { color: var(--primary); }

.page-banner {
  position: relative;
  padding: 48px 0 40px;
  margin-bottom: 8px;
  background:
    radial-gradient(ellipse 60% 80% at 90% 0%, rgba(154,123,79,0.12), transparent 50%),
    linear-gradient(180deg, #e8eef4 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.search-box {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.search-box.narrow { max-width: 480px; }
.search-box input {
  flex: 1;
  border: 0;
  outline: none;
  padding: 14px 16px;
  background: transparent;
}
.search-box button {
  border: 0;
  background: var(--navy);
  color: #fff;
  padding: 0 20px;
  font-weight: 600;
  cursor: pointer;
}
.search-box button:hover { background: var(--primary); }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  max-width: 100%;
  min-width: 0;
}
.filter-row a {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all 0.15s;
}
.filter-row a:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.filter-row a.on {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
}

.pager {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}
.pager a, .pager span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager span.on {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ---------- Detail article ---------- */
.article {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--r) + 4px);
  padding: 40px 40px 36px;
  box-shadow: var(--shadow);
}
.article h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 12px;
}
.article .subhead {
  font-size: 16px;
  color: var(--ink-2);
  margin-bottom: 18px;
}
.article .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--ink-3);
  padding: 14px 0;
  margin-bottom: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.prose {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.85;
}
.prose + .prose { margin-top: 12px; }
.h-sm {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin: 32px 0 14px;
}
.plain-list { display: grid; gap: 8px; }
.plain-list li {
  position: relative;
  padding: 10px 14px 10px 28px;
  background: var(--bg);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink-2);
}
.plain-list li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--accent);
}
.plain-list.inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.plain-list.inline li {
  padding: 8px 14px;
}
.plain-list.inline li::before { display: none; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ---------- Quiz ---------- */
.quiz-page { padding-bottom: 40px; } /* 勿用 padding 简写，以免清掉 .container 左右边距 */
.quiz-wrap {
  max-width: 680px;
  margin: 0 auto;
}
.quiz-top { margin-bottom: 16px; }
.quiz-wrap .crumb {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--navy);
  font-weight: 600;
  margin: 4px 0 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress { margin-bottom: 0; }
.progress-bar {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.progress-bar > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: inherit;
  transition: width 0.35s ease;
}
.progress-text { font-size: 13px; color: var(--ink-3); font-weight: 500; }

.quiz-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--r) + 4px);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}
.quiz-box h1 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--navy);
  margin-bottom: 22px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.option-list { display: grid; gap: 10px; }
.option-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow-wrap: anywhere;
  word-break: break-word;
  appearance: none;
  -webkit-appearance: none;
}
.option-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.option-btn.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}
.option-btn:active {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 28px;
}
.quiz-nav .btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body.is-quiz .site-footer {
  margin-top: 0;
}

/* ---------- Result (simple & clear) ---------- */
.result-simple {
  padding-top: 36px;
  padding-bottom: 64px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(26, 77, 109, 0.08), transparent 60%),
    var(--bg);
}
.result-simple-inner {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--r) + 6px);
  padding: 36px 32px 32px;
  box-shadow: var(--shadow);
  box-sizing: border-box;
}
.result-test-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.result-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  margin-bottom: 8px;
}
.result-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 7vw, 52px);
  font-weight: 900;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.result-sub {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 8px;
}

.score-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 28px 0 8px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #0d2137 0%, #1a4d6d 100%);
  border-radius: var(--r);
  color: #fff;
}
.score-hero-num {
  font-family: var(--font-display);
  font-size: clamp(64px, 14vw, 88px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  min-width: 1.2em;
}
.score-hero-num small {
  font-size: 0.28em;
  font-weight: 800;
  margin-left: 4px;
  opacity: 0.85;
  vertical-align: super;
}
.score-hero-meta {
  display: grid;
  gap: 4px;
}
.score-hero-meta strong {
  font-size: 18px;
  font-weight: 800;
}
.score-hero-meta span {
  font-size: 14px;
  opacity: 0.75;
}
.score-hero-meta em {
  font-style: normal;
  margin-top: 6px;
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: #f0d9a8;
}

.score-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.score-block h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 14px;
}
.score-block h2 small {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 6px;
}
.result-desc {
  display: grid;
  gap: 10px;
}
.result-desc p {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.75;
  color: #122033;
}

.score-clear {
  display: grid;
  gap: 16px;
  list-style: none;
}
.score-clear-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.score-clear-top b {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
}
.score-clear-top strong {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.score-clear-top strong span {
  font-size: 14px;
  font-weight: 700;
  margin-left: 2px;
  color: var(--ink-3);
}

.bar {
  height: 10px;
  background: var(--bg-2);
  border-radius: 999px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #2f7ea3);
  animation: grow 0.8s ease forwards;
  transform-origin: left;
}
.bar i.accent {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
}

.trait-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.trait-cloud span {
  padding: 8px 14px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.advice-clear {
  margin: 0;
  padding-left: 1.25em;
  display: grid;
  gap: 10px;
}
.advice-clear li {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.65;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.result-actions .btn { min-width: 140px; }
.result-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--ink-3);
}

/* ---------- Flash / footer ---------- */
.flash {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
}
.flash-error { background: #fdecea; color: #8a2b22; border: 1px solid #f5c6c2; }
.flash-success { background: #e8f5ef; color: #1f5c45; border: 1px solid #b7dfc9; }
.flash-info { background: var(--primary-soft); color: var(--primary-deep); border: 1px solid #c5d9e6; }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--navy);
  color: rgba(255,255,255,0.65);
  padding: 36px 0;
  margin-top: 24px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  align-items: center;
  font-size: 13px;
}
.footer-inner .site-name {
  font-family: var(--font-display);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.footer-links {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.footer-links a,
.footer-links .footer-share {
  color: rgba(255,255,255,0.65);
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: inherit;
  cursor: pointer;
}
.footer-links a:hover,
.footer-links .footer-share:hover { color: #fff; }

/* ---------- Share modal ---------- */
.share-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.share-modal.show {
  opacity: 1;
  visibility: visible;
}
.share-modal[hidden] { display: none !important; }
.share-modal.show[hidden] { display: flex !important; }
.share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 21, 33, 0.55);
}
.share-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  transform: translateY(10px);
  transition: transform 0.22s ease;
}
.share-modal.show .share-dialog { transform: translateY(0); }
.share-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
  border-radius: 8px;
}
.share-close:hover { color: var(--ink); background: var(--bg); }
.share-dialog h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
}
.share-tip {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.share-qr-wrap {
  display: inline-flex;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 18px;
}
.share-qr {
  display: block;
  width: 200px;
  height: 200px;
  background: #fff;
  image-rendering: pixelated;
}
.share-link-label {
  display: block;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.share-link-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.share-link-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
}
.share-link-row .btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
}
.share-copy-ok {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #1f5c45;
}
body.share-open-body { overflow: hidden; }

.nav-drawer-share {
  display: none;
}

/* ---------- Motion ---------- */
@keyframes grow {
  from { width: 0; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}
[data-reveal].is-in {
  animation: fadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal].is-in {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .bar i, .home-hero-bg::after, .home-hero-bg::before { animation: none; }
  .test-card:hover, .cat-tile:hover, .cat-scroll a:hover, .dir-row:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .test-grid,
  .test-grid-compact { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===========================
   Mobile · 统一手机体验
   =========================== */
@media (max-width: 720px) {
  :root {
    --m-pad: 28px;
    --m-radius: 14px;
    --m-tap: 48px;
    --m-header: 56px;
  }

  body {
    font-size: 15px;
    -webkit-tap-highlight-color: transparent;
  }

  .container,
  .container-narrow {
    padding-left: var(--m-pad) !important;
    padding-right: var(--m-pad) !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .site-header,
  .site-footer,
  .page-banner,
  .main {
    overflow-x: hidden;
    overflow-x: clip;
    max-width: 100%;
  }

  /* ----- Header / drawer ----- */
  .site-header {
    position: sticky;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #fff;
    border-bottom-color: var(--line);
    padding-top: env(safe-area-inset-top, 0px);
  }
  .header-inner {
    height: var(--m-header);
    gap: 12px;
  }
  .brand { font-size: 18px; letter-spacing: 0.03em; }
  .header-search,
  .nav-desktop { display: none !important; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  body.nav-open {
    overflow: hidden;
    touch-action: none;
  }

  .nav-drawer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: min(88%, 300px);
    max-width: 300px;
    height: 100%;
    height: 100dvh;
    padding:
      calc(var(--m-header) + 20px + env(safe-area-inset-top, 0px))
      18px
      calc(28px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    z-index: 190;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translate3d(calc(100% + 32px), 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s;
    box-shadow: -16px 0 48px rgba(8, 21, 33, 0.2);
  }
  .nav-drawer.open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }
  .nav-drawer a {
    display: block;
    width: 100%;
    padding: 15px 16px;
    font-size: 17px;
    font-weight: 600;
    color: var(--navy);
    border-radius: 12px;
    background: var(--bg);
    transition: background 0.15s, color 0.15s;
  }
  .nav-drawer a.cur {
    background: var(--primary-soft);
    color: var(--primary-deep);
  }
  .nav-drawer-share {
    display: block;
    width: 100%;
    text-align: left;
    padding: 15px 16px;
    font-size: 17px;
    font-weight: 600;
    color: var(--navy);
    border-radius: 12px;
    background: var(--accent-soft);
    border: 1px solid rgba(154, 123, 79, 0.25);
    cursor: pointer;
    font-family: inherit;
  }
  .nav-drawer-search {
    display: flex;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg);
  }
  .nav-drawer-search input {
    flex: 1;
    border: 0;
    outline: none;
    padding: 13px 14px;
    background: transparent;
    font-size: 16px;
    min-width: 0;
  }
  .nav-drawer-search button {
    border: 0;
    background: var(--navy);
    color: #fff;
    padding: 0 16px;
    font-weight: 700;
    font-size: 14px;
  }

  body.is-home .site-header {
    position: absolute;
    background: transparent;
    border-bottom: 0;
  }
  body.is-home.nav-open .site-header { background: #0d2137; }
  body.is-home .nav-drawer { background: #0d2137; }
  body.is-home .nav-drawer a {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
  }
  body.is-home .nav-drawer a.cur {
    background: rgba(240, 217, 168, 0.22);
    color: #f0d9a8;
  }
  body.is-home .nav-drawer-share {
    color: #0d2137;
    background: #f0d9a8;
    border-color: transparent;
  }
  body.is-home .nav-drawer-search {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
  }
  body.is-home .nav-drawer-search input { color: #fff; }
  body.is-home .nav-drawer-search input::placeholder { color: rgba(255, 255, 255, 0.45); }
  body.is-home .nav-drawer-search button {
    background: var(--accent);
    color: #fff;
  }

  /* ----- Buttons ----- */
  .btn {
    min-height: var(--m-tap);
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 15px;
    touch-action: manipulation;
  }
  .btn.lg {
    min-height: 52px;
    padding: 14px 22px;
    font-size: 16px;
    border-radius: 12px;
  }

  /* ----- Home ----- */
  .home-hero { min-height: auto; }
  .home-hero-inner {
    padding:
      calc(88px + env(safe-area-inset-top, 0px))
      0
      64px;
  }
  .brand-mark {
    font-size: clamp(40px, 12vw, 52px);
    letter-spacing: 0.05em;
    margin-bottom: 14px;
  }
  .home-hero .lead {
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 28px;
    max-width: none;
    color: rgba(255, 255, 255, 0.82);
  }
  .hero-actions {
    gap: 10px;
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
    flex: none;
  }

  .home-find {
    margin-top: -32px;
    padding: 0 0 4px;
  }
  .home-find-form {
    padding: 18px 16px 18px;
    border-radius: var(--m-radius);
    box-shadow: 0 12px 36px rgba(13, 33, 55, 0.12);
  }
  .home-find-label {
    font-size: 16px;
    margin-bottom: 12px;
  }
  .home-find-bar {
    flex-direction: row;
    border-radius: 12px;
  }
  .home-find-bar input {
    padding: 13px 14px;
    font-size: 16px;
    text-align: left;
  }
  .home-find-bar button {
    min-height: var(--m-tap);
    padding: 0 18px;
    flex-shrink: 0;
  }

  .section { padding: 36px 0; }
  .sec-head {
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 18px;
  }
  .sec-head h2 { font-size: 22px; }
  .sec-head p { font-size: 13px; margin-top: 4px; }
  .sec-head a {
    font-size: 13px;
    padding: 6px 0;
  }

  .dir-list {
    border-top: 0;
    gap: 8px;
    display: grid;
  }
  .dir-row {
    padding: 16px 14px;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }
  .dir-row:hover {
    padding-left: 14px;
    background: var(--primary-soft);
  }
  .dir-name {
    font-size: 17px;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .dir-meta { font-size: 12px; }
  .dir-go { font-size: 16px; }

  .home-featured {
    background: linear-gradient(180deg, #e8eef4 0%, var(--bg) 55%);
  }
  .home-popular { padding-top: 8px; }
  .home-close {
    padding: 44px 0 calc(44px + env(safe-area-inset-bottom, 0px));
  }
  .home-close h2 { font-size: 24px; }
  .home-close p { font-size: 15px; margin-bottom: 22px; }
  .home-close .btn { width: 100%; }

  /* ----- Lists / grids ----- */
  .test-grid,
  .test-grid-compact,
  .cat-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 100%;
  }

  .test-card,
  .cat-tile {
    max-width: 100%;
    min-width: 0;
    border-radius: 12px;
  }
  .test-card:hover,
  .cat-tile:hover,
  .cat-scroll a:hover,
  .dir-row:hover {
    transform: none;
  }
  .test-card-link {
    padding: 16px 16px 14px;
  }
  .test-card-cat {
    font-size: 11px;
    margin-bottom: 8px;
  }
  .test-card-title {
    font-size: 17px;
    line-height: 1.4;
    margin-bottom: 6px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .test-card-desc {
    font-size: 13px;
    margin-bottom: 12px;
    -webkit-line-clamp: 2;
    overflow-wrap: anywhere;
  }
  .test-card-meta {
    gap: 8px 12px;
    font-size: 12px;
    padding-top: 12px;
    margin-bottom: 10px;
  }
  .test-card-cta {
    font-size: 13px;
  }

  .cat-tile a {
    min-height: 0;
    padding: 18px 16px;
    background: linear-gradient(120deg, var(--primary-soft) 0%, transparent 60%);
  }
  .cat-name {
    font-size: 19px;
    margin-bottom: 8px;
  }
  .cat-desc {
    font-size: 13px;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
  }
  .cat-tile .cat-num { font-size: 12px; }

  .cat-scroll {
    gap: 8px;
    margin: 0;
    padding: 0 0 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .cat-scroll::-webkit-scrollbar { display: none; }
  .cat-scroll a {
    padding: 10px 14px;
    min-height: 42px;
    font-size: 13px;
    border-radius: 999px;
  }

  /* ----- Page chrome ----- */
  .page-banner {
    padding: 22px 0 18px;
    background:
      radial-gradient(ellipse 80% 90% at 100% 0%, rgba(154, 123, 79, 0.1), transparent 55%),
      linear-gradient(180deg, #e8eef4 0%, var(--bg) 100%);
  }
  .page-head { max-width: none; margin-bottom: 0; }
  .page-head h1 {
    font-size: 26px;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .page-head p {
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }
  .page {
    padding-top: 20px;
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    /* 不设置左右 padding，保留 .container 边距 */
  }
  .crumb {
    font-size: 12px;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
  }

  .search-box,
  .search-box.narrow {
    max-width: 100%;
    width: 100%;
    flex-direction: row;
    align-items: stretch;
    border-radius: 12px;
    margin-bottom: 14px;
  }
  .search-box input {
    width: auto;
    flex: 1;
    min-width: 0;
    padding: 13px 14px;
    font-size: 16px;
  }
  .search-box button {
    width: auto;
    min-width: 72px;
    min-height: var(--m-tap);
    padding: 0 16px;
    flex-shrink: 0;
    font-size: 14px;
  }

  .filter-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 0 18px;
    padding: 2px 0 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-row a {
    flex: 0 0 auto;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 999px;
  }

  .pager {
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    justify-content: center;
    padding-bottom: 4px;
    margin-top: 28px;
  }
  .pager a,
  .pager span {
    min-width: 38px;
    height: 38px;
    font-size: 13px;
    flex-shrink: 0;
    border-radius: 10px;
  }

  .empty {
    padding: 48px 20px;
    border-radius: 12px;
    font-size: 14px;
  }

  /* ----- Test detail ----- */
  .article {
    padding: 22px 18px 20px;
    border-radius: var(--m-radius);
    max-width: 100%;
    width: 100%;
    box-shadow: 0 1px 2px rgba(13, 33, 55, 0.04), 0 8px 24px rgba(13, 33, 55, 0.05);
  }
  .article h1 {
    font-size: 24px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .article .subhead {
    font-size: 15px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }
  .article .meta {
    gap: 6px 14px;
    font-size: 12px;
    padding: 12px 0;
    margin-bottom: 18px;
  }
  .article .prose {
    font-size: 15px;
    line-height: 1.8;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .h-sm {
    font-size: 18px;
    margin: 26px 0 12px;
  }
  .plain-list li {
    padding: 12px 14px 12px 28px;
    font-size: 14px;
    border-radius: 10px;
    overflow-wrap: anywhere;
  }

  body.is-test .page {
    padding-top: 20px;
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }
  body.is-test .site-footer { display: none; }
  body.is-test .article .actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    margin: 0;
    padding: 12px var(--m-pad) calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -8px 28px rgba(13, 33, 55, 0.08);
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
  }
  body.is-test .article .actions .btn {
    min-height: var(--m-tap);
    border-radius: 12px;
  }
  body.is-test .article .actions .btn.accent,
  body.is-test .article .actions .btn.lg {
    flex: 1.35;
  }
  body.is-test .article .actions .btn.ghost.share-open {
    flex: 1;
    padding-left: 10px;
    padding-right: 10px;
  }
  body.is-test .article .actions > a.btn.ghost {
    display: none;
  }

  /* ----- Quiz ----- */
  body.is-quiz .site-footer { display: none; }
  body.is-quiz .main { min-height: 0; }
  body.is-quiz .site-header {
    background: #fff;
  }
  .quiz-page {
    padding-top: 10px;
    padding-bottom: 0;
    max-width: 100%;
  }
  .quiz-wrap {
    max-width: 100%;
    margin: 0;
    padding: 0 0 calc(84px + env(safe-area-inset-bottom, 0px));
  }
  .quiz-top {
    position: sticky;
    top: calc(var(--m-header) + env(safe-area-inset-top, 0px));
    z-index: 40;
    margin: 0;
    padding: 12px 0;
    background: rgba(242, 244, 247, 0.97);
    border-bottom: 1px solid var(--line);
  }
  .quiz-wrap .crumb {
    font-size: 13px;
    margin: 0 0 8px;
    white-space: nowrap;
  }
  .progress-bar { height: 5px; margin-bottom: 6px; }
  .progress-text { font-size: 12px; }

  .quiz-box {
    margin: 0;
    padding: 20px 0 24px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    min-height: calc(100dvh - 220px);
    max-width: 100%;
  }
  .quiz-box h1 {
    font-size: 18px;
    line-height: 1.55;
    margin-bottom: 18px;
  }
  .option-list { gap: 10px; }
  .option-btn {
    padding: 15px 16px;
    min-height: 54px;
    font-size: 15px;
    line-height: 1.5;
    border-radius: 12px;
    background: var(--surface);
    border-color: var(--line);
    box-shadow: 0 1px 2px rgba(13, 33, 55, 0.04);
  }
  .option-btn:hover { background: var(--surface); }
  .option-btn.selected,
  .option-btn:active {
    background: var(--primary-soft);
    border-color: var(--primary);
  }

  .quiz-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    margin: 0;
    gap: 8px;
    padding: 10px var(--m-pad) calc(10px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(13, 33, 55, 0.08);
  }
  .quiz-nav .btn {
    flex: 1;
    min-height: var(--m-tap);
    font-size: 15px;
    border-radius: 12px;
  }

  /* ----- Result ----- */
  .result-simple {
    padding-top: 16px;
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  }
  .result-simple-inner {
    padding: 24px 20px 22px;
    border-radius: var(--m-radius);
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  .result-test-name { margin-bottom: 14px; }
  .result-title {
    font-size: clamp(28px, 9vw, 36px);
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .result-sub { font-size: 15px; }
  .score-hero {
    flex-direction: row;
    align-items: center;
    padding: 16px 16px;
    gap: 14px;
    margin: 22px 0 6px;
    border-radius: 12px;
  }
  .score-hero-num { font-size: clamp(52px, 16vw, 68px); }
  .score-hero-meta strong { font-size: 16px; }
  .score-hero-meta span { font-size: 13px; }
  .score-block { margin-top: 22px; padding-top: 20px; }
  .score-block h2 { font-size: 19px; }
  .result-desc p { font-size: 15px; }
  .score-clear-top b { font-size: 15px; }
  .score-clear-top strong { font-size: 24px; }
  .advice-clear li { font-size: 14px; }
  .result-actions {
    flex-direction: column;
    gap: 8px;
    margin-top: 26px;
  }
  .result-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: var(--m-tap);
  }
  .trait-cloud span {
    padding: 7px 12px;
    font-size: 12px;
  }

  /* ----- Footer ----- */
  .site-footer {
    padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px));
    margin-top: 8px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    font-size: 12px;
    line-height: 1.6;
  }
  .footer-inner .site-name { font-size: 16px; }
  .footer-links {
    flex-wrap: wrap;
    gap: 10px 16px;
  }
  .site-footer .container { overflow-wrap: anywhere; }

  .flash { margin-top: 12px; font-size: 13px; }
}

@media (max-width: 400px) {
  :root { --m-pad: 22px; }
  .brand-mark { font-size: 38px; }
  .page-head h1 { font-size: 24px; }
  .article h1 { font-size: 22px; }
  .score-hero {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .test-card-meta { gap: 6px 10px; }
  body.is-test .article .actions {
    flex-direction: column;
  }
  body.is-test .article .actions .btn.ghost,
  body.is-test .article .actions .btn.accent,
  body.is-test .article .actions .btn.lg {
    flex: none;
    width: 100%;
  }
}
