:root {
  --label: #1c1c1e;
  --secondary: rgba(60, 60, 67, 0.62);
  --tertiary: rgba(60, 60, 67, 0.36);
  --accent: #ff3b30;
  --glass: rgba(255, 255, 255, 0.46);
  --glass-strong: rgba(255, 255, 255, 0.62);
  --stroke: rgba(255, 255, 255, 0.72);
  --hairline: rgba(60, 60, 67, 0.14);
  --shadow: 0 12px 40px rgba(80, 40, 60, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  color: var(--label);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #f6e7ea;
  touch-action: manipulation;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(42% 36% at 12% 8%, #ffb7c8 0%, transparent 70%),
    radial-gradient(38% 42% at 92% 6%, #ffd7b0 0%, transparent 68%),
    radial-gradient(46% 40% at 86% 88%, #c9d6ff 0%, transparent 70%),
    radial-gradient(40% 36% at 8% 86%, #ffc8b0 0%, transparent 70%),
    linear-gradient(180deg, #fff6f4 0%, #f3e4ea 100%);
}
body.theme-palace::before {
  background:
    radial-gradient(42% 36% at 12% 8%, #ffb0a6 0%, transparent 70%),
    radial-gradient(40% 40% at 90% 10%, #ffd0b8 0%, transparent 68%),
    radial-gradient(46% 40% at 80% 90%, #f3c2cf 0%, transparent 70%),
    linear-gradient(180deg, #fff4f1 0%, #f8e4e2 100%);
}
body.theme-dusk::before {
  background:
    radial-gradient(42% 36% at 10% 12%, #ffb3cc 0%, transparent 70%),
    radial-gradient(40% 42% at 92% 8%, #e7c6ff 0%, transparent 68%),
    radial-gradient(46% 40% at 78% 92%, #ffd0e0 0%, transparent 70%),
    linear-gradient(180deg, #fff5f8 0%, #f6e3ee 100%);
}
body.theme-ink::before {
  background:
    radial-gradient(42% 36% at 12% 10%, #c7e7ff 0%, transparent 70%),
    radial-gradient(40% 40% at 90% 8%, #d9d4ff 0%, transparent 68%),
    radial-gradient(46% 40% at 84% 90%, #d8f3ea 0%, transparent 70%),
    linear-gradient(180deg, #f4f8ff 0%, #e7eef8 100%);
}
body.theme-palace { --accent: #ff3b30; }
body.theme-dusk { --accent: #ff2d55; }
body.theme-ink { --accent: #0a84ff; }

button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
#app { min-height: 100dvh; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.phone {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  width: min(402px, 100%);
  margin: 0 auto;
  height: calc(48px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background: rgba(255, 255, 255, 0.38);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.12);
}
.nav strong {
  text-align: center;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.nav-back {
  padding-left: 16px;
  font-size: 17px;
  font-weight: 400;
  color: var(--accent);
}
.nav-mark {
  padding-right: 16px;
  text-align: right;
  font-family: "Songti SC", "STSong", serif;
  color: var(--accent);
  font-size: 17px;
}
.sheet {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: min(402px, 100%);
  margin: 0 auto;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
}

.hero-m { padding: 12px 4px 16px; }
.hero-m h1 {
  margin: 0;
  font-weight: 700;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.hero-m p { margin: 8px 0 0; color: var(--secondary); font-size: 15px; line-height: 1.5; }

.covers { display: grid; gap: 12px; }
.cover {
  position: relative;
  min-height: 132px;
  padding: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 22px;
  color: var(--label);
  background: rgba(255, 255, 255, 0.38);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.cover > * { position: relative; z-index: 1; }
.cover-mark {
  position: absolute;
  z-index: 0;
  right: 8px;
  bottom: -28px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 108px;
  line-height: 0.8;
  color: rgba(28, 28, 30, 0.06);
}
.cover-top { display: flex; justify-content: space-between; align-items: center; }
.cover-index { font-size: 12px; color: var(--secondary); letter-spacing: 0.02em; }
.stamp {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.55);
  border: 0.5px solid rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.cover h2 { margin: 14px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.25; }
.cover-hook { margin: 4px 0 0; color: var(--secondary); font-size: 13px; }
.cover-zhenhuan { background: rgba(255, 59, 48, 0.22); }
.cover-love { background: rgba(255, 45, 85, 0.2); }
.cover-mbti16 { background: rgba(10, 132, 255, 0.18); }
.cover-mbti60 { background: rgba(88, 86, 214, 0.18); }
.foot { margin: 16px 4px 0; color: var(--tertiary); font-size: 12px; line-height: 1.6; }

.kicker { margin: 0; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 0; }
.intro h1, .pay h1, .q-title, .who, .hero-m h1, .pay-price { letter-spacing: -0.03em; }
.intro h1, .pay h1 { margin: 8px 0 0; font-size: 34px; font-weight: 700; line-height: 1.15; }
.lede, .verdict, .advice { font-size: 17px; line-height: 1.55; color: var(--label); }
.lede { margin: 12px 0 0; color: var(--secondary); }

.intro, .pay { flex: 1; display: flex; flex-direction: column; min-height: calc(100dvh - 72px); }
.dock { margin-top: auto; padding-top: 20px; }
.primary, .ghost {
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 0;
}
.primary {
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
}
.primary:disabled { opacity: 0.45; }
.ghost {
  background: rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  color: var(--accent);
  border: 0.5px solid rgba(255, 255, 255, 0.7);
}
.textlink, button.textlink {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 0;
  background: transparent;
  text-align: center;
  color: var(--accent);
  font-size: 15px;
}

.q {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 72px);
}
.ghost-no { display: none; }
.q-head { display: flex; justify-content: space-between; align-items: baseline; }
.q-no { font-size: 13px; color: var(--secondary); font-variant-numeric: tabular-nums; }
.progress { height: 4px; margin: 12px 0 20px; background: rgba(60, 60, 67, 0.12); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.q-title {
  margin: 4px 0 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
}
.options { margin-top: auto; display: grid; gap: 10px; padding-top: 24px; }
.opt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  min-height: 64px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  box-shadow: 0 8px 24px rgba(80, 40, 60, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  color: var(--label);
  font-size: 17px;
  line-height: 1.45;
}
.opt b {
  flex: none;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.7);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}
.opt.on, .opt:active {
  background: color-mix(in srgb, var(--accent) 86%, white);
  border-color: transparent;
  color: #fff;
  box-shadow: none;
}
.opt.on b, .opt:active b { background: rgba(255, 255, 255, 0.28); color: #fff; }

.seal-block {
  width: 72px;
  height: 72px;
  margin: 8px 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-family: "Songti SC", "STSong", serif;
  font-size: 28px;
  background: rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.75);
}
.pay-price { margin: 6px 0 0; font-size: 48px; font-weight: 700; color: var(--accent); line-height: 1; }
.fine, .note, .meta, .scoreline, .shade { color: var(--secondary); font-size: 13px; line-height: 1.6; }
.fine { margin: 12px 0 0; }
.note { margin-top: 10px; }
.code {
  width: 100%;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 0.5px solid rgba(60, 60, 67, 0.16);
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 17px;
}
.who { margin: 6px 0 0; font-size: 34px; font-weight: 700; line-height: 1.2; }
.who.code { font-size: 64px; letter-spacing: -0.04em; color: var(--accent); line-height: 1; }
.rule { width: 36px; height: 3px; margin: 14px 0; border-radius: 99px; background: var(--accent); }
.traits { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.traits span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 13px;
  color: var(--secondary);
}
.block-label { margin: 20px 0 8px; font-size: 13px; font-weight: 600; color: var(--secondary); }
.evidence { display: grid; gap: 8px; }
.evidence article, .sting {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  line-height: 1.55;
  font-size: 15px;
}
.meter, .track { height: 6px; border-radius: 99px; background: rgba(60, 60, 67, 0.12); overflow: hidden; }
.meter { margin: 12px 0 8px; }
.meter span, .track i { display: block; height: 100%; background: var(--accent); }
.track { display: flex; }
.track b { display: block; height: 100%; background: rgba(60, 60, 67, 0.18); }
.bars { display: grid; gap: 12px; margin: 10px 0 16px; }
.bar-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; color: var(--secondary); }
.sharebox {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  line-height: 1.55;
  font-size: 16px;
}
.poster { width: 100%; margin-top: 14px; display: block; border-radius: 16px; }
.err {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 59, 48, 0.12);
  color: #d70015;
  font-size: 14px;
}

@media (min-width: 820px) {
  body { display: grid; place-items: center; }
  .phone {
    width: 390px;
    height: min(844px, calc(100dvh - 48px));
    min-height: 0;
    border-radius: 44px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.28);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.66);
    box-shadow:
      0 30px 80px rgba(90, 40, 60, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.8);
    scrollbar-width: none;
  }
  .phone::-webkit-scrollbar { display: none; }
  .nav, .sheet { width: 100%; }
  .nav { border-radius: 44px 44px 0 0; }
  .intro, .pay, .q { min-height: calc(min(844px, 100dvh - 48px) - 64px); }
}
