:root {
  color-scheme: dark;
  --ink: #111222;
  --surface: #1b1d32;
  --line: #424362;
  --cream: #fff0d9;
  --muted: #c4bdd6;
  --accent: #ebc98f;
  --violet: #c4b1f4;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--cream);
  background: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; background: radial-gradient(ellipse at 88% 38%, #242048 0%, transparent 54%), var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .56; }
button, select, input, textarea { border-radius: 10px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }
.shell { width: min(1120px, calc(100% - 48px)); margin: auto; min-height: 100svh; display: flex; flex-direction: column; }
.brand { min-height: 84px; display: flex; align-items: center; gap: 12px; color: var(--cream); letter-spacing: .2em; font-size: 1rem; border-bottom: 1px solid #ffffff20; }
.brand span { font-size: 1.7rem; color: var(--accent); }
main { flex: 1; display: grid; align-items: center; }
.hero { min-height: 510px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 20px; padding-block: 44px; }
.intro { padding: 0 0 0 12px; }
.eyebrow { color: var(--accent); font-size: .875rem; letter-spacing: .22em; margin: 0 0 14px; }
h1, h2 { font-family: "Songti SC", "Noto Serif CJK SC", "SimSun", serif; margin: 0; }
h1 { font-size: clamp(2.25rem, 5.2vw, 4.2rem); letter-spacing: -.035em; line-height: 1.28; font-weight: 700; }
h1 span { color: var(--accent); }
.lede { color: var(--muted); line-height: 1.85; margin: 22px 0 28px; max-width: 32ch; }
.primary, .secondary { min-height: 48px; padding: 9px 24px; font-weight: 650; border: 1px solid transparent; }
.primary { color: #261b2d; background: var(--accent); }
.primary:hover:not(:disabled) { background: #ffdc9f; }
.secondary { color: var(--cream); border-color: var(--line); background: transparent; }
.secondary:hover { background: #ffffff0e; }
#start { min-width: 180px; }
.facts, footer, .hint { color: var(--muted); font-size: .875rem; }
.facts { margin: 15px 0 0; }
.facts span, footer span { margin-inline: .4em; color: var(--accent); }
.art { position: relative; display: grid; place-items: center; aspect-ratio: 1; isolation: isolate; border-radius: 50%; background: radial-gradient(circle, #3c30574d, transparent 68%); }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mask-image: radial-gradient(circle, black 56%, transparent 72%); }
.panel { margin: 36px auto; width: min(100%, 660px); background: #1b1d32eb; border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 5vw, 40px); box-shadow: 0 20px 75px #09091555; }
.panel h2 { font-size: clamp(1.7rem, 5vw, 2.35rem); line-height: 1.38; }
.fields { margin: 25px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.fields label { display: grid; gap: 8px; }
.fields input:not([type=checkbox]), select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); background: #131525; color: var(--cream); }
select { appearance: none; padding-right: 30px; background: linear-gradient(45deg, transparent 50%, var(--violet) 51%) right 17px center / 6px 6px no-repeat, linear-gradient(135deg, var(--violet) 50%, transparent 51%) right 11px center / 6px 6px no-repeat, #131525; }
select:disabled { opacity: .55; }
.age { display: grid; grid-template-columns: minmax(0, 1fr) 6ch; gap: 7px; margin-top: 8px; }
.age select { padding-left: 8px; padding-right: 20px; background-position: right 11px center, right 5px center; }
.fields .check { display: flex; align-items: center; margin-top: 8px; color: var(--muted); font-size: .875rem; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; margin-left: 0; }
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.progress { display: flex; gap: 13px; align-items: center; margin-bottom: 18px; color: var(--accent); font-size: .875rem; }
progress { flex: 1; height: 5px; border: 0; border-radius: 10px; background: #3a3955; accent-color: var(--accent); }
progress::-webkit-progress-bar { background: #3a3955; border-radius: 10px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 10px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 10px; }
.hint { margin: 9px 0 16px; }
fieldset { margin: 0; padding: 0; border: 0; display: grid; min-width: 0; gap: 9px; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 52px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; line-height: 1.55; cursor: pointer; }
.choice:hover { background: #ffffff0c; }
.choice:has(:checked) { border-color: var(--accent); background: #ebc98f14; }
.choice input { accent-color: var(--accent); flex: 0 0 17px; width: 17px; height: 17px; margin: 0; }
.result { text-align: center; }
.letter { background: radial-gradient(ellipse at 50% 0%, #3a2c55, transparent 62%), #161629; border: 1px solid #7c6b62; border-radius: 16px; padding: 18px clamp(15px, 5vw, 30px) 25px; }
.seal { color: var(--accent); font-size: 2.5rem; line-height: 1.2; margin-bottom: 8px; }
.pet-line { color: var(--violet); line-height: 1.55; overflow-wrap: anywhere; }
.story { margin-top: 22px; text-align: left; }
.story h3 { color: var(--accent); letter-spacing: .16em; font-size: .875rem; margin: 0 0 4px; }
.story p { line-height: 1.72; margin: 0; color: #f1e5f2; }
.result-actions { justify-content: center; }
#share-status:empty { display: none; }
footer { text-align: center; border-top: 1px solid #ffffff20; padding: 20px 0; }
@media (max-width: 680px) {
  .shell { width: calc(100% - 32px); }
  .brand { min-height: 59px; }
  .hero { min-height: auto; gap: 0; grid-template-columns: 1fr; padding: 9px 0 31px; }
  .art { grid-row: 1; width: min(75vw, 290px); justify-self: center; }
  .intro { text-align: center; padding: 0; }
  .lede { margin: 12px auto 20px; }
  .panel { margin: 20px auto; }
}
@media (max-width: 390px) {
  .fields { grid-template-columns: 1fr; gap: 13px; }
}
