:root {
  --ink: #3c291f;
  --muted: #7b6256;
  --gold: #e39a12;
  --gold-deep: #b87408;
  --pool: #5ec4ef;
  --card: rgba(255, 252, 247, 0.86);
  --line: rgba(92, 58, 34, 0.12);
  --shadow: 0 18px 40px rgba(120, 72, 28, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(820px 380px at 8% -8%, #ffffff 0%, transparent 62%),
    radial-gradient(720px 420px at 100% 0%, #d7f3ff 0%, transparent 58%),
    linear-gradient(180deg, #fff8ef 0%, #ffe6c2 48%, #fff3df 100%);
}

a { color: var(--gold-deep); }

img { max-width: 100%; display: block; }

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 72px;
}

.nav {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 248, 238, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(120, 72, 28, 0.08);
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.nav a:hover,
.nav a.active { color: var(--gold-deep); }

.nav .spacer { flex: 1; min-width: 12px; }

.nav .nav-break {
  display: none;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.lang-switch button {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.lang-switch button[aria-current="true"] {
  color: var(--gold-deep);
  cursor: default;
}

[data-lang="en"] { display: none !important; }
html.lang-en [data-lang="zh"] { display: none !important; }
html.lang-en [data-lang="en"] { display: revert !important; }
html.lang-en .hero h1 > [data-lang="en"] { display: block !important; }

h1.visually-hidden,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  margin-top: 20px;
  padding: 0 0 20px;
  text-align: center;
}

.hero-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  padding: 40px 32px 36px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background:
    radial-gradient(80% 70% at 50% 40%, #fffdf8 0%, #fff3e3 58%, #ffe7c0 100%);
}

.lockup-wrap {
  position: relative;
  z-index: 3;
  width: min(640px, 86%);
  filter: drop-shadow(0 16px 18px rgba(120, 72, 28, 0.16));
}

.lockup,
.lockup img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
}

.lockup-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 34%, rgba(255, 255, 255, 0.55) 50%, transparent 66%);
  background-size: 220% 100%;
  background-position: 130% 0;
  animation: sheen 9s ease-in-out infinite;
  -webkit-mask-image: url("/pooppoop/img/lockup.webp");
  mask-image: url("/pooppoop/img/lockup.webp");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

@keyframes sheen {
  0%, 62% { background-position: 130% 0; }
  82%, 100% { background-position: -30% 0; }
}

.hero-copy {
  padding: 0 8px;
}

.kicker {
  margin: 16px 0 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  color: #2f8eb8;
}

.hero h1 {
  margin: 8px 0 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero h1 span {
  display: block;
  margin-top: 6px;
  font-size: 0.46em;
  letter-spacing: 0.01em;
  font-weight: 750;
  color: var(--muted);
}

.lede {
  max-width: 640px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 17px;
}

.quiz-cta {
  margin: 22px 0 0;
}

.quiz-entry {
  text-align: center;
}

.hero-copy .quiz-entry {
  margin: 22px auto 0;
  max-width: 640px;
}

.quiz-entry-card {
  padding: 28px 22px 26px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.quiz-entry h2 {
  margin: 0 0 8px;
}

.quiz-entry p {
  margin: 0 auto;
  max-width: 36em;
  color: var(--muted);
  font-size: 16px;
}

.quiz-entry .quiz-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 18px auto 0;
  max-width: none;
  text-align: center;
}

.result-family {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.quiz-cta a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(160deg, #ffc857, var(--gold-deep));
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 10px 22px rgba(184, 116, 8, 0.22);
}

.quiz-cta a:hover { filter: brightness(1.05); }

.quiz {
  margin-top: 22px;
  padding: 28px 22px 24px;
  border-radius: 28px;
  background: rgba(255, 252, 247, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
  text-align: center;
}

.quiz h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
}

.quiz .progress {
  margin: 8px 0 0;
  color: #2f8eb8;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.quiz .ask {
  margin: 18px auto 0;
  max-width: 640px;
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.choices {
  display: grid;
  gap: 10px;
  max-width: 640px;
  margin: 22px auto 0;
  text-align: left;
}

.choices button {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.choices button:hover { border-color: var(--gold); }

.choices .letter {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #fff4dc;
  color: var(--gold-deep);
  font-weight: 800;
}

.portrait {
  width: min(280px, 70vw);
  height: auto;
  margin: 8px auto 0;
  filter: drop-shadow(0 16px 18px rgba(120, 72, 28, 0.16));
}

.stars {
  margin: 10px 0 0;
  color: var(--gold-deep);
  letter-spacing: 0.12em;
  font-size: 18px;
}

.result-name {
  margin: 4px 0 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.bio {
  max-width: 560px;
  margin: 16px auto 0;
  text-align: center;
}

.bio h2 {
  margin: 14px 0 4px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2f8eb8;
}

.bio p {
  margin: 0;
  font-size: 17px;
}

.catch {
  font-weight: 750;
}

.quiz-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.quiz-actions a,
.quiz-actions button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.quiz-actions .again {
  background: linear-gradient(160deg, #ffc857, var(--gold-deep));
  border-color: transparent;
  color: #fff;
}

.stores {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 750;
  font-size: 14px;
}

.section {
  margin-top: 18px;
}

.section h2 {
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

.card {
  padding: 18px 18px 16px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card .mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(160deg, var(--pool), #2f8eb8);
  margin-bottom: 12px;
}

.card.gold .mark { background: linear-gradient(160deg, #ffc857, var(--gold-deep)); }

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(120, 72, 28, 0.16);
}

.card-art {
  display: grid;
  place-items: center;
  height: 132px;
  margin: 0 0 12px;
}

.card-art img {
  max-height: 132px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(120, 72, 28, 0.12));
}

.steps {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 8px;
}

.steps img {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.legal a {
  text-decoration: none;
  font-weight: 750;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
}

.legal a:hover { color: var(--gold-deep); }

footer {
  margin-top: 36px;
  color: var(--muted);
  font-size: 13px;
}

.doc {
  width: min(820px, calc(100% - 32px));
}

.doc main {
  margin-top: 22px;
  padding: 28px 26px 8px;
  border-radius: 28px;
  background: rgba(255, 252, 247, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
}

.doc h1 { margin: 0 0 6px; letter-spacing: -0.03em; }

.doc h2 { margin: 26px 0 8px; font-size: 20px; }

.doc .muted { color: var(--muted); }

.doc ul { padding-left: 18px; }

.doc li { margin: 6px 0; }

.en {
  margin-top: 28px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

@media (max-width: 800px) {
  .grid { grid-template-columns: 1fr; }
  .nav {
    border-radius: 22px;
    gap: 6px 10px;
    padding: 8px 12px;
  }
  .nav a,
  .lang-switch,
  .lang-switch button { font-size: 13px; }
  .nav .spacer { display: none; }
  .nav .nav-break {
    display: block;
    flex: 0 0 100%;
    width: 100%;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    pointer-events: none;
  }
  .hero { margin-top: 16px; padding-bottom: 12px; }
  .hero-stage {
    padding: 22px 16px 20px;
    border-radius: 22px;
  }
  .lockup-wrap { width: min(420px, 90%); }
  .card-art { height: 150px; }
  .card-art img { max-height: 150px; }
  .lede { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lockup-sheen {
    animation: none !important;
  }
  .card {
    transition: none;
  }
  .card:hover,
  .card:focus-within {
    transform: none;
  }
}
