:root {
  color-scheme: light;
  font-family: "Nunito", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: #fcf3ed;
  color: #2d1933;
  --ink: #2d1933;
  --muted: #655067;
  --paper: #fffaf2;
  --purple: #6934a3;
  --purple-dark: #562780;
  --line: #dfc9e7;
  --lime: #e7ed88;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; background: radial-gradient(ellipse at 50% 0%, #f0dff4, transparent 62%), #fcf3ed; line-height: 1.6; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
h1:focus, h2:focus { outline: none; }
.shell { width: min(470px, calc(100% - 32px)); margin-inline: auto; padding-top: clamp(15px, 4vw, 40px); }
.receipt { position: relative; padding: 19px clamp(16px, 6vw, 30px) 24px; background: var(--paper); border: 1px solid #8d629e; border-radius: 22px; box-shadow: 0 12px 30px #4e246517; }
.receipt-head { display: flex; justify-content: center; align-items: center; gap: 12px; padding-bottom: 9px; border-bottom: 2px dashed #dcc1e7; font-size: .89rem; font-weight: 800; letter-spacing: .08em; }
.receipt-head span { color: var(--purple); font-size: 1.1rem; line-height: 1; }
.home { text-align: center; }
.home-copy { padding-top: 16px; }
h1 { font-size: clamp(2.25rem, 9.2vw, 3.75rem); line-height: 1.12; letter-spacing: -.055em; font-weight: 950; }
h1 span { display: table; margin-inline: auto; position: relative; isolation: isolate; }
h1 span::after { content: ""; position: absolute; inset: auto -.13em .01em -.13em; height: .29em; border-radius: 40% 41% 29% 35%; background: var(--lime); transform: rotate(-3deg); z-index: -1; }
.tagline { margin-top: 12px; color: var(--muted); font-weight: 700; font-size: clamp(.89rem, 3.5vw, 1.04rem); }
.home-art { position: relative; margin: 11px auto 4px; width: min(100%, 325px); height: clamp(145px, 51vw, 218px); }
.home-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.home-actions p { margin-bottom: 9px; color: var(--muted); font-size: .83rem; font-weight: 750; }
.home-actions p span, footer span { margin-inline: 4px; color: var(--purple); }
.button { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 9px 13px; border: 1px solid transparent; border-radius: 12px; font-weight: 800; }
.primary { color: white; background: var(--purple); box-shadow: 0 4px 9px #6934a326; }
.primary:hover { background: var(--purple-dark); }
.secondary { color: var(--ink); background: #fffaf5; border-color: var(--line); }
.secondary:hover { background: #f5e9fa; }
.text-button { border: 0; border-radius: 6px; background: none; color: var(--muted); padding: 6px; min-height: 44px; font-size: .82rem; }
.text-button:hover { color: var(--purple); }
.home-actions .button, .previous { width: 100%; }
footer { text-align: center; margin: 13px 8px 20px; color: var(--muted); font-size: .74rem; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; font-weight: 750; margin-top: -8px; }
progress { appearance: none; display: block; width: 100%; height: 7px; border: 0; border-radius: 10px; overflow: hidden; background: #ebd9f0; }
progress::-webkit-progress-bar { background: #ebd9f0; }
progress::-webkit-progress-value { background: var(--purple); border-radius: 10px; }
progress::-moz-progress-bar { background: var(--purple); border-radius: 10px; }
.scene { display: inline-block; margin-top: 17px; padding: 2px 8px; border-radius: 6px; color: #562780; background: #f1e3f6; font-size: .78rem; font-weight: 800; }
.quiz h2 { margin-top: 7px; font-size: clamp(1.17rem, 4.2vw, 1.47rem); line-height: 1.43; }
.options { display: grid; gap: 8px; margin-top: 15px; }
.option { display: flex; width: 100%; align-items: center; gap: 10px; text-align: left; min-height: 51px; color: var(--ink); background: #fffcf9; border: 1px solid var(--line); border-radius: 12px; padding: 7px 9px; font-size: .91rem; }
.option-letter { display: grid; place-items: center; height: 27px; flex: 0 0 27px; border-radius: 8px; background: #f1e3f6; color: var(--purple); font-weight: 850; font-size: .8rem; }
.option[aria-pressed="true"], .option:active { background: #f3e8f8; border-color: var(--purple); }
.option[aria-pressed="true"] .option-letter { color: #fff; background: var(--purple); }
@media (hover: hover) { .option:hover { border-color: var(--purple); } }
.previous { margin-top: 12px; min-height: 44px; }
.result > h2 { text-align: center; font-size: clamp(1.65rem, 6vw, 2.3rem); line-height: 1.2; margin-top: 15px; }
.gauge { --angle: 0deg; --thickness: 13px; position: relative; isolation: isolate; width: min(71%, 235px); aspect-ratio: 2 / 1; margin: 16px auto 10px; overflow: hidden; }
.gauge-art { position: absolute; z-index: -1; width: 100%; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(from 270deg, #783bb7 0deg var(--angle), #e8d4f1 var(--angle) 180deg, transparent 180deg); }
.gauge-art::after { content: ""; position: absolute; inset: var(--thickness); border-radius: 50%; background: var(--paper); }
.gauge-value { position: absolute; inset: auto 0 0; text-align: center; color: var(--purple-dark); font-size: .89rem; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge-value strong { font-size: clamp(2.75rem, 12vw, 4.4rem); letter-spacing: -.05em; }
.gauge-value span { margin-left: 2px; font-weight: 750; }
.result-intro { text-align: center; margin: 10px 0 15px; }
.result-intro h3 { display: inline-block; padding: 0 8px; background: linear-gradient(transparent 24%, var(--lime) 24% 92%, transparent 92%); font-size: 1.36rem; }
.result-intro p, .detail p, .method { color: var(--muted); font-size: .86rem; }
.result-intro p { margin-top: 3px; }
.chart { padding: 11px 12px 13px; border-radius: 14px; border: 1px solid #caa9dc; }
.chart h3 { text-align: center; color: var(--purple-dark); font-size: 1rem; }
.bar-list { padding: 0; list-style: none; display: grid; gap: 8px; margin: 9px 0 0; }
.bar-row { display: grid; grid-template-columns: auto 1fr 3.1ch; align-items: center; gap: 9px; font-size: .82rem; font-weight: 700; }
.bar-row > span:last-child { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.bar-track { height: 9px; border-radius: 12px; overflow: hidden; background: #ebdcf1; }
.bar-fill { display: block; height: 100%; width: var(--bar-width); border-radius: inherit; background: #783bb7; }
.detail { margin-top: 12px; padding: 10px 12px; background: #f6edf8; border-radius: 12px; }
.detail h3 { color: var(--purple-dark); font-size: .9rem; margin-bottom: 3px; }
.method { margin-top: 9px; }
.method summary { cursor: pointer; width: fit-content; border-radius: 4px; }
.method p { margin-top: 5px; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin-top: 13px; }
.copy-status { color: var(--muted); font-size: .78rem; margin-top: 5px; }
textarea { width: 100%; min-height: 100px; resize: vertical; border: 1px solid var(--line); border-radius: 9px; padding: 8px; font: inherit; color: var(--ink); background: white; }
.noscript { margin-top: 10px; text-align: center; }
@media (max-width: 350px) {
  .shell { width: calc(100% - 20px); }
  .receipt { padding-inline: 14px; }
  .option { font-size: .85rem; }
}
