:root {
  --ink: #1d2927;
  --muted: #667570;
  --paper: #f7f6ef;
  --card: rgba(255,255,252,.9);
  --jade: #47796a;
  --jade-dark: #315d52;
  --amber: #d28e64;
  --line: rgba(29,41,39,.12);
  --wood: #4c8c61;
  --fire: #d75d45;
  --earth: #b48745;
  --metal: #77838c;
  --water: #427b9b;
  --shadow: 0 20px 70px rgba(55,77,68,.11);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #f7f6ef url("city-spring-bg.jpg") center / cover fixed no-repeat;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .72;
  background: linear-gradient(180deg, rgba(250,249,244,.1), rgba(245,248,242,.68));
}

button, select { font: inherit; }
button { cursor: pointer; }
.modal-open { overflow: hidden; }
.shell { position: relative; z-index: 1; width: min(790px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 64px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .08em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: white; border-radius: 50% 50% 46% 54%; background: var(--jade); box-shadow: 0 8px 20px rgba(56,95,83,.2); transform: rotate(-4deg); }
.step-pill { color: var(--muted); font-size: 13px; border: 1px solid var(--line); padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.5); }

.panel { background: var(--card); border: 1px solid rgba(255,255,255,.82); border-radius: 26px; box-shadow: var(--shadow); overflow: hidden; backdrop-filter: blur(16px); }
.hero { min-height: 315px; display: flex; align-items: center; padding: 44px; position: relative; color: var(--ink); background: linear-gradient(90deg, rgba(252,251,247,.96), rgba(252,251,247,.58) 58%, rgba(252,251,247,.08)), url("city-spring-bg.jpg") center 66% / cover no-repeat; }
.hero-copybox { max-width: 540px; padding: 28px 30px; border-left: 3px solid rgba(71,121,106,.55); background: rgba(255,255,252,.56); backdrop-filter: blur(4px); }
.eyebrow { margin: 0 0 14px; color: var(--amber); font-size: 12px; font-weight: 700; letter-spacing: .18em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 520px; margin-bottom: 14px; font-family: "Songti SC", "STSong", serif; font-size: clamp(38px, 7vw, 64px); line-height: 1.08; letter-spacing: -.03em; }
.hero-copy { max-width: 500px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.hero-tags span { padding: 7px 11px; color: var(--jade-dark); border: 1px solid rgba(71,121,106,.18); border-radius: 999px; background: rgba(255,255,255,.58); font-size: 12px; }

.content { padding: 34px 42px 42px; }
.section-title { margin-bottom: 8px; font-size: 22px; }
.section-copy { color: var(--muted); line-height: 1.75; }
.privacy-note { display: inline-flex; align-items: center; gap: 7px; margin: 4px 0 0; padding: 7px 10px; color: var(--jade-dark); border-radius: 999px; background: rgba(71,121,106,.08); font-size: 12px; }
.privacy-note span { width: 17px; height: 17px; display: grid; place-items: center; color: white; border-radius: 50%; background: var(--jade); font-size: 10px; }
.saved-entry { width: 100%; display: flex; justify-content: space-between; align-items: center; margin: 16px 0 2px; padding: 14px 16px; color: var(--ink); border: 1px solid rgba(71,121,106,.2); border-radius: 14px; background: rgba(71,121,106,.06); text-align: left; }
.saved-entry b { color: var(--jade-dark); font-size: 13px; }
.calendar-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 22px 0 10px; padding: 5px; border-radius: 15px; background: rgba(29,41,39,.06); }
.calendar-btn { padding: 11px 14px; color: var(--muted); border: 0; border-radius: 11px; background: transparent; }
.calendar-btn.active { color: white; font-weight: 700; background: var(--jade); box-shadow: 0 7px 18px rgba(23,105,91,.18); }
.date-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; margin: 24px 0; }
.field label { display: block; margin: 0 0 8px 3px; color: var(--muted); font-size: 13px; }
.field select, .field input { width: 100%; padding: 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 13px; outline: none; background: rgba(255,255,255,.9); }
.field select:focus, .field input:focus { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(71,121,106,.1); }
.birth-time-field { margin: 2px 0 18px; }
.birth-time-field label span { margin-left: 5px; padding: 3px 7px; color: var(--jade-dark); border-radius: 999px; background: rgba(71,121,106,.09); font-size: 10px; }
.birth-time-field p { margin: 8px 3px 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.birth-extra { display: grid; grid-template-columns: 1.6fr 1fr; align-items: end; gap: 16px; margin: -8px 0 22px; }
.leap-field { min-height: 50px; display: flex; align-items: center; padding: 13px 15px; color: var(--muted); border: 1px solid var(--line); border-radius: 14px; background: white; }
.leap-field input { width: 18px; height: 18px; margin-right: 8px; accent-color: var(--jade); }
.form-error { min-height: 20px; margin: -10px 0 10px; color: #b44838; font-size: 13px; }
.primary, .secondary, .option { border: 0; border-radius: 15px; transition: .2s ease; }
.primary { width: 100%; padding: 16px 20px; color: white; font-weight: 750; background: var(--jade); box-shadow: 0 12px 28px rgba(23,105,91,.22); }
.primary:hover { background: var(--jade-dark); transform: translateY(-1px); }
.primary:disabled { opacity: .38; cursor: not-allowed; transform: none; }
.secondary { padding: 11px 14px; color: var(--jade); background: rgba(23,105,91,.08); }
.fineprint { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; text-align: center; }

.access-overlay { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(28,37,34,.58); backdrop-filter: blur(8px); animation: accessFade .18s ease-out; }
.access-modal { width: min(470px,100%); position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.72); border-radius: 25px; background: #fffdf8; box-shadow: 0 28px 90px rgba(21,35,30,.3); animation: accessRise .22s ease-out; }
.access-close { width: 38px; height: 38px; position: absolute; z-index: 1; top: 18px; right: 18px; color: var(--muted); border: 0; border-radius: 50%; background: #f0ece3; font-size: 25px; line-height: 1; }
.access-head { display: flex; align-items: center; gap: 16px; padding: 30px 64px 25px 30px; border-bottom: 1px solid var(--line); }
.access-lock { width: 62px; height: 62px; flex: 0 0 62px; display: grid; place-items: center; color: var(--jade-dark); border-radius: 20px; background: rgba(71,121,106,.12); font: 800 18px/1 "Songti SC",serif; }
.access-head h2 { margin-bottom: 7px; font: 800 28px/1.2 "Songti SC",serif; }
.access-head p { margin: 0; color: var(--muted); font-size: 14px; }
.access-form { padding: 26px 30px 18px; }
.access-form label { display: block; margin-bottom: 9px; color: var(--ink); font-size: 13px; font-weight: 700; }
.access-form input { width: 100%; padding: 15px 16px; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; outline: none; background: white; font: 700 20px/1 system-ui,sans-serif; letter-spacing: .22em; }
.access-form input:focus { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(71,121,106,.1); }
.access-message { min-height: 21px; margin: 8px 2px; color: #b44838; font-size: 12px; }
.access-submit { width: 100%; padding: 15px; color: white; border: 0; border-radius: 14px; background: var(--jade); font-weight: 750; }
.access-submit:disabled { opacity: .38; cursor: not-allowed; }
.access-help { display: flex; justify-content: center; gap: 6px; padding: 0 30px 28px; color: var(--muted); font-size: 12px; }
.access-help b { color: var(--jade-dark); }
@keyframes accessFade { from { opacity: 0; } }
@keyframes accessRise { from { opacity: 0; transform: translateY(12px) scale(.985); } }

.element-card { padding: 36px; text-align: center; background: linear-gradient(145deg, rgba(23,105,91,.08), rgba(213,140,49,.08)); border: 1px solid var(--line); border-radius: 22px; }
.element-orb { width: 102px; height: 102px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 32px; color: white; font-size: 44px; box-shadow: 0 16px 38px rgba(29,41,39,.18); transform: rotate(-4deg); }
.element-name { margin-bottom: 10px; font: 800 34px/1.2 "Songti SC", serif; }
.element-desc { max-width: 500px; margin: 0 auto; color: var(--muted); line-height: 1.8; }
.pillars { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; margin-top: 24px; }
.pillars.three-pillars { grid-template-columns: repeat(3,1fr); }
.pillars div { padding: 12px 8px; border-radius: 13px; background: rgba(255,255,255,.66); }
.pillars span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.pillars b { color: var(--ink); font: 800 21px/1.2 "Songti SC", serif; }
.pillars small { min-height: 30px; display: block; margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.pattern-panel { margin-top: 18px; padding: 18px; text-align: left; border: 1px solid rgba(71,121,106,.15); border-radius: 16px; background: rgba(255,255,255,.68); }
.pattern-panel > div:first-child { display: flex; align-items: baseline; gap: 12px; }
.pattern-panel span { color: var(--muted); font-size: 12px; }
.pattern-panel b { color: var(--jade-dark); font: 800 24px/1.2 "Songti SC", serif; }
.pattern-panel p { margin: 9px 0; color: var(--muted); font-size: 13px; }
.pattern-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.pattern-meta span { padding: 5px 8px; border-radius: 999px; background: rgba(71,121,106,.08); }
.notice { margin: 20px 0; padding: 16px 18px; color: var(--muted); border-radius: 15px; background: #f7f2e8; font-size: 13px; line-height: 1.7; }
.element-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.element-actions .outline { min-width: 145px; background: rgba(255,255,255,.48); }

.progress-row { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.chapter-kicker { margin-bottom: 13px; color: var(--jade); font: 700 12px/1.4 "Songti SC", serif; letter-spacing: .15em; }
.progress { height: 7px; margin-bottom: 30px; overflow: hidden; border-radius: 10px; background: rgba(29,41,39,.08); }
.progress > div { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--jade), #45a08f); transition: width .3s; }
.restore-note { margin: -18px 0 18px; color: var(--jade-dark); font-size: 12px; }
.question { margin-bottom: 24px; font-size: clamp(23px, 4vw, 31px); line-height: 1.45; font-family: "Songti SC", serif; }
.options { display: grid; gap: 11px; }
.option { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 12px; width: 100%; padding: 15px; color: var(--ink); text-align: left; border: 1px solid var(--line); background: white; }
.option:hover, .option:focus-visible { border-color: var(--jade); background: rgba(23,105,91,.04); transform: translateX(3px); outline: none; }
.option-key { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--jade); font-weight: 800; background: rgba(23,105,91,.09); }
.quiz-actions { display: flex; justify-content: space-between; margin-top: 22px; }

.ritual { min-height: 570px; display: grid; place-items: center; padding: 46px 20px; text-align: center; }
.orbit { width: 260px; height: 260px; position: relative; margin: 0 auto 34px; animation: turn 12s linear infinite; }
.orbit::before { content: ""; position: absolute; inset: 28px; border: 1px dashed rgba(23,105,91,.35); border-radius: 50%; }
.orbit-core { position: absolute; inset: 85px; display: grid; place-items: center; border-radius: 50%; color: white; font-size: 34px; background: var(--jade); box-shadow: 0 0 40px rgba(23,105,91,.28); }
.mini-orb { width: 58px; height: 58px; position: absolute; display: grid; place-items: center; border-radius: 19px; color: white; font-size: 27px; box-shadow: 0 8px 22px rgba(29,41,39,.18); }
.mini-orb:nth-child(2) { left: 101px; top: 0; background: var(--wood); }
.mini-orb:nth-child(3) { right: 8px; top: 72px; background: var(--fire); }
.mini-orb:nth-child(4) { right: 42px; bottom: 7px; background: var(--earth); }
.mini-orb:nth-child(5) { left: 42px; bottom: 7px; background: var(--metal); }
.mini-orb:nth-child(6) { left: 8px; top: 72px; background: var(--water); }
@keyframes turn { to { transform: rotate(360deg); } }
.ritual h2 { font: 800 31px/1.3 "Songti SC", serif; }
.ritual-status { color: var(--muted); }

.result-head { padding: 36px 42px 26px; color: white; background: linear-gradient(135deg, var(--jade-dark), var(--jade)); }
.result-head h1 { font-size: 42px; }
.result-head p { margin: 0; color: rgba(255,255,255,.72); }
.result-head .pillar-line { margin-top: 9px; color: #ead6ad; font: 700 15px/1.5 "Songti SC", serif; letter-spacing: .08em; }
.profile-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 22px 0 30px; }
.profile-item { padding: 12px 6px; text-align: center; border-radius: 13px; background: rgba(255,255,255,.08); }
.profile-item b { display: block; margin-top: 5px; font-size: 18px; }
.result-method { margin-bottom: 28px; padding: 20px; border: 1px solid rgba(71,121,106,.17); border-radius: 17px; background: rgba(238,246,239,.7); }
.result-method > div { display: flex; align-items: baseline; gap: 12px; }
.result-method span, .result-method small { color: var(--muted); font-size: 12px; }
.result-method b { color: var(--jade-dark); font: 800 24px/1.2 "Songti SC", serif; }
.result-method p { margin: 9px 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.city-list { display: grid; gap: 14px; }
.city-card { position: relative; padding: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: white; }
.city-card.primary-city { padding: 28px; border: 1px solid rgba(213,140,49,.36); background: linear-gradient(145deg, #fff, #fbf6eb); }
.city-rank { color: var(--amber); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.city-title-row { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin: 9px 0 12px; }
.city-name { margin: 0; font: 800 33px/1.2 "Songti SC", serif; }
.city-score { min-width: 72px; color: var(--jade); text-align: right; }
.city-score span { display: block; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .08em; }
.city-score b { display: block; font-size: 28px; line-height: 1.1; }
.city-summary { color: var(--muted); line-height: 1.75; }
.city-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.city-tags span { padding: 6px 9px; color: var(--jade-dark); border-radius: 9px; background: rgba(23,105,91,.08); font-size: 12px; }
.reality-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.reality-strip span { padding: 5px 8px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; font-size: 10px; }
.why { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.7; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.outline { padding: 14px; color: var(--jade); border: 1px solid var(--jade); border-radius: 14px; background: transparent; }
.method-details { margin-top: 22px; padding: 0 16px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.62); }
.method-details summary { padding: 14px 0; color: var(--jade-dark); font-size: 13px; font-weight: 700; cursor: pointer; }
.method-details p { color: var(--muted); font-size: 12px; line-height: 1.75; }
.method-details a { color: var(--jade-dark); }

@media (max-width: 620px) {
  .shell { width: min(100% - 22px, 760px); padding-top: 16px; }
  .topbar { margin-bottom: 14px; }
  .panel { border-radius: 22px; }
  .hero, .content, .result-head { padding: 28px 22px; }
  .hero { min-height: 300px; background-position: 58% 70%; }
  .hero-copybox { padding: 22px 18px; }
  .date-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: repeat(4,minmax(58px,1fr)); }
  .pillars b { font-size: 18px; }
  .profile-grid { grid-template-columns: repeat(5, minmax(54px, 1fr)); overflow-x: auto; }
  .profile-item { font-size: 11px; }
  .city-title-row { align-items: center; }
  .city-name { font-size: 28px; }
  .city-score b { font-size: 23px; }
  .result-actions { grid-template-columns: 1fr; }
  .element-actions { grid-template-columns: 1fr; }
  .access-head { padding: 25px 55px 22px 22px; }
  .access-lock { width: 52px; height: 52px; flex-basis: 52px; border-radius: 17px; }
  .access-head h2 { font-size: 24px; }
  .access-form { padding: 22px 22px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
