:root {
  --bg: #f6faf6;
  --panel: #ffffff;
  --text: #1e2a22;
  --muted: #6a786f;
  --line: #dbe8dd;
  --soft: #edf6ef;
  --accent: #6c8d71;
  --accent-strong: #4d6a53;
  --shadow: 0 16px 40px rgba(47, 73, 55, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(108, 141, 113, 0.12), transparent 55%),
    radial-gradient(circle at top left, #f8fff8 0, #f6faf6 38%, #eef5f0 100%);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.intro-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.extras-hint {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-empty {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  padding: 12px 0 4px;
}
.history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fafdfb);
  font: inherit;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.history-item:active {
  background: var(--soft);
}
.history-item .hi-type {
  font-weight: 800;
  color: var(--accent-strong);
  font-size: 14px;
}
.history-item .hi-cn {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-item time {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.btn-ghost {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background .15s ease, color .15s ease;
}
.btn-ghost:hover {
  background: var(--soft);
  color: var(--accent-strong);
}

.history-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.history-modal[hidden] {
  display: none !important;
}
.history-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 42, 34, 0.45);
}
.history-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: 82vh;
  overflow: auto;
  margin: 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0));
  border-radius: 22px 22px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: 0 -8px 40px rgba(47, 73, 55, 0.12);
}
.history-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.history-modal-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.history-modal-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.history-modal-close:hover {
  background: var(--soft);
}
.disclaimer-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: #304034;
}
.disclaimer-body p {
  margin: 12px 0 0;
}
.disclaimer-body p:first-child {
  margin-top: 0;
}
.disclaimer-body ul {
  margin: 10px 0 0;
  padding-left: 1.15em;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}
.disclaimer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  justify-content: flex-end;
}
.disclaimer-actions .btn-primary,
.disclaimer-actions .btn-secondary {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
}
@media (min-width: 560px) {
  .history-modal {
    align-items: center;
    padding: 20px;
  }
  .history-modal-panel {
    border-radius: var(--radius);
    border-bottom: 1px solid var(--line);
    max-height: 88vh;
  }
  .poster-preview-modal .history-modal-panel {
    max-height: min(88vh, 920px);
  }
}

.result-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}
.result-share-row .btn-secondary {
  flex: 1 1 auto;
  min-width: 120px;
  justify-content: center;
}
.result-share-row .btn-secondary:disabled {
  opacity: 0.65;
  transform: none;
}

.poster-preview-modal .history-modal-panel {
  max-width: min(420px, 100vw);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 16px calc(14px + env(safe-area-inset-bottom, 0));
}
.poster-preview-modal .poster-preview-top {
  flex-shrink: 0;
}
.poster-preview-modal .poster-preview-top .history-modal-head {
  margin-bottom: 6px;
}
.poster-preview-modal .poster-preview-hint {
  margin: 0 0 10px !important;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.poster-preview-modal .poster-preview-file-hint {
  margin: -4px 0 10px !important;
  font-size: 12px;
  line-height: 1.55;
  color: #7a6230;
  background: rgba(214, 190, 120, 0.2);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(180, 150, 70, 0.35);
}
.poster-preview-scroll {
  flex: 1 1 auto;
  min-height: 140px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f4faf5 0%, #eef4f0 100%);
  border: 1px solid var(--line);
  text-align: center;
}
.poster-preview-scroll img {
  width: 100%;
  max-width: 100%;
  height: auto;
  vertical-align: top;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 6px 28px rgba(47, 73, 55, 0.12);
}
.poster-preview-actions {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  padding-top: 2px;
  border-top: 1px solid var(--line);
}
.poster-preview-actions .btn-primary {
  flex: 1 1 140px;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
}
.poster-preview-actions .btn-secondary {
  flex: 1 1 120px;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
}
.poster-preview-actions .btn-ghost {
  flex: 1 1 100%;
  margin-top: 2px;
}

.site-footer {
  margin-top: 8px;
  padding: 8px 0 calc(12px + env(safe-area-inset-bottom, 0));
}
.site-footer .footer-card {
  padding: 20px 22px 22px;
}
.site-footer-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.footer-block {
  margin-top: 16px;
}
.footer-block:first-of-type {
  margin-top: 0;
}
.footer-block h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-strong);
}
.footer-block p {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.85;
  color: #304034;
}
.footer-block p:first-of-type {
  margin-top: 0;
}
.footer-block a {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
}
.footer-block a:hover {
  text-decoration: underline;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  padding: 28px;
  margin-top: 20px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(127, 165, 134, 0.18), rgba(127, 165, 134, 0.02));
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--accent-strong);
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 999px;
  padding: 8px 12px;
  margin-bottom: 16px;
}

h1, h2, h3, p { margin: 0; }
.hero h1 {
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 680px;
}
.hero .sub {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  max-width: 720px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 18px;
  align-items: stretch;
  margin-top: 24px;
}

.mini-panel {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfefb, #f3f8f4);
}

.mini-panel h3 {
  font-size: 15px;
  margin-bottom: 10px;
}

.mini-panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero.hero-landing::after {
  display: none;
}

.hero-landing {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4.5vw, 48px);
  margin-top: 12px;
}
.hero-landing::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(108, 141, 113, 0.35), rgba(219, 232, 221, 0.6), rgba(108, 141, 113, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.hero-landing-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 100% 0%, rgba(108, 141, 113, 0.16), transparent 52%),
    radial-gradient(ellipse 70% 60% at 0% 100%, rgba(77, 106, 83, 0.09), transparent 48%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(247, 251, 248, 0.65) 100%);
  pointer-events: none;
}
.hero-landing-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.12fr minmax(220px, 300px);
  grid-template-areas: "copy visual";
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
}
.hero-landing-copy {
  grid-area: copy;
}
.hero-landing-copy .eyebrow {
  margin-bottom: 14px;
}
.hero-landing h1 {
  text-align: left;
  max-width: 560px;
  font-size: clamp(30px, 5.2vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0;
}
.hero-landing h1 .headline-line1 {
  display: block;
  color: var(--text);
}
.hero-landing h1 .headline-line2 {
  display: block;
  margin-top: 0.1em;
}
.gradient-text {
  background: linear-gradient(108deg, #2d4a34 0%, #4d6a53 32%, #6c8d71 58%, #3d5c44 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-landing .sub {
  text-align: left;
  max-width: 500px;
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.75;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  box-shadow: 0 4px 14px rgba(47, 73, 55, 0.05);
}
.hero-facts li strong {
  color: var(--accent-strong);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.hero-landing .hero-actions {
  margin-top: 26px;
  justify-content: flex-start;
}
.hero-actions-intro {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}
.hero-actions-intro #startBtn {
  flex: 1 1 200px;
  min-height: 52px;
}
.hero-actions-intro #openHistoryBtn,
.hero-actions-intro #homeShareBtn {
  flex: 1 1 140px;
  min-height: 52px;
}
.btn-hero {
  padding: 16px 30px;
  border-radius: 16px;
  font-size: 16px;
  letter-spacing: 0.02em;
}
.hero-meta {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(219, 232, 221, 0.95);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
}
.hero-meta a {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
}
.hero-meta a:hover {
  text-decoration: underline;
}
.hero-landing-visual {
  grid-area: visual;
  position: relative;
  min-height: 280px;
  isolation: isolate;
}
.visual-ring {
  position: absolute;
  width: min(280px, 100%);
  aspect-ratio: 1;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background:
    conic-gradient(from 200deg, rgba(108, 141, 113, 0.12), rgba(237, 246, 239, 0.9), rgba(108, 141, 113, 0.15));
  border: 1px solid rgba(219, 232, 221, 0.9);
  box-shadow: inset 0 0 60px rgba(255, 255, 255, 0.5), 0 20px 50px rgba(47, 73, 55, 0.07);
}
.visual-ring span {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: linear-gradient(160deg, #fff, #f0f7f2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(77, 106, 83, 0.22);
  user-select: none;
}
.visual-card {
  position: absolute;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(47, 73, 55, 0.08);
  padding: 11px 15px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-strong);
  white-space: nowrap;
  z-index: 2;
}
.visual-card.v1 { top: 6%; right: 4%; transform: rotate(-5deg); }
.visual-card.v2 { top: 42%; left: -4%; transform: rotate(3deg); }
.visual-card.v3 { bottom: 14%; right: -2%; transform: rotate(4deg); }
.visual-card.v4 { bottom: 38%; left: 8%; transform: rotate(-2deg); font-size: 12px; font-weight: 700; color: var(--muted); }

.visual-chip-row {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

@media (max-width: 720px) {
  .hero-landing {
    padding: 20px 16px 22px;
    margin-top: 8px;
  }
  .shell {
    padding: 16px 12px calc(48px + env(safe-area-inset-bottom, 0));
  }
  .intro-stack {
    gap: 12px;
  }
  .hero-landing-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "visual";
    gap: 18px;
    align-items: stretch;
  }
  .hero-landing-copy {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
  }
  .hero-landing-copy .eyebrow {
    margin-bottom: 10px;
    max-width: 100%;
    align-self: flex-start;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
    line-height: 1.45;
  }
  .hero-facts,
  .hero-landing .hero-actions,
  .hero-meta {
    align-self: stretch;
    width: 100%;
  }
  .hero-landing h1 {
    text-align: left;
    max-width: none;
    text-wrap: balance;
    font-size: clamp(26px, 7.2vw, 34px);
  }
  .hero-landing h1 .headline-line1,
  .hero-landing h1 .headline-line2 {
    text-align: left;
  }
  .hero-landing .sub {
    text-align: left;
    max-width: none;
    font-size: 15px;
    margin-top: 14px;
  }
  .hero-facts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 16px;
  }
  .hero-facts li {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 14px;
    border-radius: 14px;
  }
  .hero-landing .hero-actions-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "start start"
      "hist share";
    gap: 10px;
    margin-top: 20px;
  }
  .hero-landing .hero-actions-intro #startBtn {
    grid-area: start;
    width: 100%;
    flex: none;
  }
  .hero-landing .hero-actions-intro #openHistoryBtn {
    grid-area: hist;
  }
  .hero-landing .hero-actions-intro #homeShareBtn {
    grid-area: share;
  }
  .hero-landing .btn-hero {
    min-width: 0;
    max-width: none;
    padding: 14px 16px;
    font-size: 15px;
  }
  .hero-meta {
    margin-top: 20px;
    padding-top: 16px;
    font-size: 12px;
    text-align: left;
  }
  .hero-landing-visual {
    min-height: 0;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px 14px;
    padding: 12px 14px;
    isolation: auto;
    background: linear-gradient(135deg, rgba(251, 254, 251, 0.98), rgba(237, 246, 239, 0.45));
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(47, 73, 55, 0.05);
  }
  .hero-landing-visual .visual-ring {
    position: relative;
    width: 76px;
    height: 76px;
    left: auto;
    right: auto;
    top: auto;
    transform: none;
    flex-shrink: 0;
    box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.55), 0 10px 24px rgba(47, 73, 55, 0.06);
  }
  .hero-landing-visual .visual-ring span {
    font-size: 15px;
    letter-spacing: 0.06em;
  }
  .hero-landing-visual .visual-card {
    position: static;
    transform: none;
    white-space: normal;
    text-align: center;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(47, 73, 55, 0.07);
  }
  .hero-landing-visual .visual-card.v4 {
    font-size: 11px;
  }
  .hero-landing-visual .visual-chip-row {
    position: static;
    pointer-events: auto;
    inset: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: center;
    gap: 8px;
    flex: 1 1 140px;
    min-width: 0;
    max-width: none;
  }
}

button {
  border: 0;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
  font: inherit;
}

button:hover { transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: 0.55; transform: none; }

.btn-primary {
  background: var(--accent-strong);
  color: #fff;
  padding: 14px 20px;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(77, 106, 83, 0.18);
  font-weight: 700;
}

.btn-secondary {
  background: #fff;
  color: var(--accent-strong);
  padding: 14px 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-weight: 700;
}

.screen { display: none; }
.screen.active { display: block; }

.test-wrap,
.result-wrap {
  margin-top: 22px;
  padding: 22px;
}

.test-progress-dock {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 250;
  padding-top: env(safe-area-inset-top, 0);
  background: rgba(246, 250, 246, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(47, 73, 55, 0.07);
}
.test-progress-dock[hidden] {
  display: none !important;
}
.test-progress-dock-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 16px 14px;
}
body.test-screen-active .test-wrap.card {
  margin-top: calc(58px + env(safe-area-inset-top, 0px));
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.topbar-dock {
  margin-bottom: 0;
}

.progress {
  flex: 1;
  min-width: 240px;
  height: 10px;
  background: #edf3ee;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #97b59c, #5b7a62);
  border-radius: inherit;
  transition: width .22s ease;
}

.progress-text {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.question-list {
  display: grid;
  gap: 16px;
}

.question {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdfb);
}

.question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.question-title {
  font-size: 16px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.option:hover {
  border-color: #bcd0c1;
  background: #f8fcf9;
}

.option input {
  margin-top: 3px;
  accent-color: var(--accent-strong);
  transform: scale(1.1);
  flex-shrink: 0;
}

.option-code {
  font-weight: 800;
  color: var(--accent-strong);
  min-width: 22px;
}

.actions-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 6px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.result-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: stretch;
}

.type-box,
.score-box,
.dim-box,
.top3-box,
.about-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdfb);
}

.type-kicker {
  font-size: 12px;
  color: var(--accent-strong);
  margin-bottom: 8px;
  letter-spacing: .05em;
}

.type-name {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.type-subname {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.match {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--accent-strong);
  font-weight: 700;
}

.type-desc {
  margin-top: 18px;
  line-height: 1.85;
  font-size: 15px;
  color: #304034;
}

.score-box h3,
.dim-box h3,
.top3-box h3,
.about-box h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.score-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.score-item .k {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.score-item .v {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-strong);
}

.dim-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dim-pill {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.dim-pill .label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.dim-pill .value {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-strong);
}

.top3-list {
  display: grid;
  gap: 10px;
}

.top3-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.top3-item strong {
  display: block;
  margin-bottom: 4px;
}

.top3-item span {
  color: var(--muted);
  font-size: 13px;
}

.top3-score {
  color: var(--accent-strong);
  font-weight: 800;
  white-space: nowrap;
}

.about-box p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.footer-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}


.result-layout {
  display: grid;
  gap: 18px;
}
.result-top {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  align-items: stretch;
}
.poster-box, .type-box, .analysis-box, .dim-box, .note-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdfb);
}
.poster-box {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 280px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(127,165,134,0.16), rgba(127,165,134,0) 40%),
    linear-gradient(180deg, #ffffff, #f7fbf8);
}
.poster-box::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -46px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(127,165,134,0.12), rgba(127,165,134,0.01));
  pointer-events: none;
}
.poster-image {
  width: 100%;
  min-height: 220px;
  max-height: 460px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255,255,255,0.75);
  position: relative;
  z-index: 1;
}
.poster-box.no-image .poster-image {
  display: none;
}
.poster-caption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}
.type-kicker {
  font-size: 12px;
  color: var(--accent-strong);
  margin-bottom: 8px;
  letter-spacing: .06em;
}
.type-name {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.type-subname {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.match {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
}
.analysis-box h3, .dim-box h3, .note-box h3 {
  font-size: 16px;
  margin-bottom: 12px;
}
.analysis-box p {
  margin: 0;
  color: #304034;
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-wrap;
}
.dim-list {
  display: grid;
  gap: 12px;
}
.dim-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}
.dim-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.dim-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.dim-item-score {
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}
.dim-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.note-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.result-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  margin-top: 22px;
}
@media (max-width: 860px) {
  .result-top { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .hero-grid,
  .result-hero {
    grid-template-columns: 1fr;
  }
  .dim-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .shell { padding: 14px 12px calc(42px + env(safe-area-inset-bottom, 0)); }
  .site-footer .footer-card { padding: 16px 16px 18px; }
  .hero, .test-wrap, .result-wrap { padding: 16px; }
  .hero h1 { font-size: 32px; }
  .hero-landing h1 { font-size: clamp(28px, 9vw, 40px); }
  .question-title { font-size: 15px; }
  .dim-grid,
  .score-grid { grid-template-columns: 1fr; }
}


.lang-item.active {
  color: var(--accent-strong);
  font-weight: bolder;
  /*         border-bottom: 2px solid #6366f1; */
}

.lang-bar {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 12px 16px 0;
  font-size: 14px;
}
.lang-item {
  color: #333;
  text-decoration: none;
}
.lang-item:hover {
  color: var(--accent-strong);
}