:root {
  color: #171714;
  background: #f2efe7;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --paper: #f2efe7;
  --paper-light: #faf8f1;
  --ink: #171714;
  --muted: rgba(23, 23, 20, 0.68);
  --faint: rgba(23, 23, 20, 0.16);
  --gold: #b59a62;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --art: "Hannotate SC", "Xingkai SC", "FZKai-Z03", "Kaiti SC", "STKaiti", KaiTi, var(--serif);
}

html[lang="en"] {
  --serif: Georgia, "Times New Roman", serif;
  --art: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(181, 154, 98, 0.76);
  outline-offset: 4px;
}

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

.answer-app {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  isolation: isolate;
  background: var(--paper);
}

.paper-noise {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.38;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.topbar {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 84px;
  padding: max(18px, env(safe-area-inset-top)) max(30px, env(safe-area-inset-right)) 12px max(30px, env(safe-area-inset-left));
}

.wordmark {
  display: inline-flex;
  width: max-content;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.wordmark-cn {
  font-family: var(--serif);
  font-size: 25px;
}

.wordmark-year {
  font-family: Georgia, serif;
  font-size: 20px;
}

.current-module {
  position: relative;
  padding-bottom: 12px;
  font-family: var(--art);
  font-size: 18px;
}

.current-module::after {
  position: absolute;
  right: 25%;
  bottom: 0;
  left: 25%;
  height: 2px;
  background: var(--gold);
  content: "";
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.language-switcher {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 13px;
  font-family: var(--art);
  font-size: 12px;
}

.language-switcher a {
  min-width: 24px;
  min-height: 44px;
  padding-top: 14px;
  color: rgba(23, 23, 20, 0.68);
  text-align: center;
  text-decoration: none;
}

.language-switcher a[aria-current="page"] {
  border-bottom: 1px solid var(--gold);
  color: var(--ink);
}

.language-switcher a:hover {
  color: var(--ink);
}

.icon-button {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transition: background-color 160ms ease-out, transform 160ms ease-out;
}

.icon-button:hover {
  background: rgba(23, 23, 20, 0.06);
}

.icon-button:active {
  transform: scale(0.94);
}

.icon-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.icon-button[aria-pressed="false"] .sound-wave {
  opacity: 0.28;
}

.history-count {
  position: absolute;
  top: 1px;
  right: -2px;
  display: none;
  min-width: 17px;
  height: 17px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--paper-light);
  background: var(--ink);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.history-count.has-items {
  display: flex;
}

.book-stage {
  position: relative;
  display: flex;
  width: min(100%, 1500px);
  min-height: 100dvh;
  margin: 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 112px 32px 54px;
}

.intro-copy {
  position: relative;
  z-index: 4;
  display: grid;
  justify-items: center;
  max-width: 620px;
  margin-bottom: 34px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: rgba(23, 23, 20, 0.72);
  font-family: var(--art);
  font-size: 14px;
}

.eyebrow i {
  width: 38px;
  height: 1px;
  background: var(--gold);
}

.intro-copy h1 {
  margin: 0;
  font-family: var(--art);
  font-size: clamp(46px, 5vw, 70px);
  font-weight: 600;
  line-height: 1.08;
  text-wrap: balance;
}

.intro-copy h1 span,
.intro-copy h1 em {
  display: inline-block;
}

.intro-copy h1 em {
  color: inherit;
  font-style: normal;
}

.subtitle {
  margin: 14px 0 0;
  color: rgba(23, 23, 20, 0.7);
  font-family: var(--art);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}

.question-home {
  position: relative;
  z-index: 4;
  width: min(660px, 100%);
  border-top: 1px solid rgba(23, 23, 20, 0.16);
  border-bottom: 1px solid rgba(23, 23, 20, 0.16);
  padding: 28px 0 24px;
}

.instruction-list {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.instruction-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 14px;
}

.instruction-list li > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(181, 154, 98, 0.62);
  border-radius: 50%;
  color: #8d7547;
  font-family: Georgia, serif;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.instruction-list p {
  margin: 2px 0 0;
  font-family: var(--art);
  font-size: 16px;
  line-height: 1.75;
  text-wrap: pretty;
}

.instruction-list small {
  display: block;
  margin-top: 5px;
  color: rgba(23, 23, 20, 0.66);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.7;
}

.view-answer {
  display: block;
  min-width: 160px;
  min-height: 48px;
  margin: 26px auto 0;
  border: 1px solid var(--ink);
  padding: 0 28px;
  color: var(--paper-light);
  background: var(--ink);
  font-family: var(--art);
  font-size: 15px;
  cursor: pointer;
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.view-answer:hover {
  opacity: 0.84;
  transform: translateY(-1px);
}

.view-answer:active {
  transform: scale(0.98);
}

.question-home .library-note {
  margin-top: 14px;
  text-align: center;
}

.seo-content {
  position: relative;
  z-index: 3;
  width: min(840px, calc(100% - 48px));
  margin: 0 auto;
  border-top: 1px solid rgba(23, 23, 20, 0.18);
  padding: 72px 0 88px;
}

.seo-eyebrow {
  margin: 0 0 10px;
  color: rgba(23, 23, 20, 0.62);
  font-family: var(--art);
  font-size: 13px;
}

.seo-content h2 {
  margin: 0;
  font-family: var(--art);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}

.seo-intro {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(23, 23, 20, 0.76);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.9;
  text-wrap: pretty;
}

.faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  margin-top: 38px;
  border-top: 1px solid rgba(23, 23, 20, 0.14);
}

.faq-list article {
  border-bottom: 1px solid rgba(23, 23, 20, 0.14);
  padding: 24px 0 26px;
}

.faq-list h3 {
  margin: 0;
  font-family: var(--art);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-wrap: balance;
}

.faq-list p {
  margin: 10px 0 0;
  color: rgba(23, 23, 20, 0.72);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.85;
  text-wrap: pretty;
}

.related-tools {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 34px;
  font-family: var(--art);
  font-size: 13px;
}

.related-tools p {
  margin: 0;
  color: rgba(23, 23, 20, 0.62);
}

.related-tools a {
  min-height: 44px;
  border-bottom: 1px solid rgba(23, 23, 20, 0.34);
  padding: 12px 0 8px;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.related-tools a:hover {
  opacity: 0.68;
  transform: translateY(-1px);
}

.ritual-guide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-top: 18px;
  color: rgba(23, 23, 20, 0.46);
  font-family: var(--serif);
  font-size: 11px;
}

.ritual-guide span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.ritual-guide b {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(181, 154, 98, 0.52);
  border-radius: 50%;
  color: #8d7547;
  font-size: 10px;
  font-weight: 400;
}

.ritual-guide > i {
  width: 30px;
  height: 1px;
  background: rgba(23, 23, 20, 0.14);
}

.ink-orbit {
  position: absolute;
  z-index: 0;
  top: 49%;
  left: 50%;
  width: min(82vw, 1100px);
  aspect-ratio: 1.8;
  border: 1px solid rgba(23, 23, 20, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -35%) rotate(-2deg);
}

.ink-orbit::before,
.ink-orbit::after {
  position: absolute;
  inset: -5px 18px 7px -9px;
  border: 1px dashed rgba(23, 23, 20, 0.08);
  border-radius: 50%;
  content: "";
  transform: rotate(1.8deg);
}

.ink-orbit::after {
  inset: 9px -3px -6px 14px;
  border-style: solid;
  opacity: 0.5;
  transform: rotate(-1.1deg);
}

.gold-fleck {
  position: absolute;
  z-index: 4;
  top: 57%;
  left: 19%;
  width: 42px;
  height: 18px;
  background: var(--gold);
  box-shadow: 0 6px 14px rgba(79, 63, 35, 0.14);
  transform: rotate(37deg) skewX(-13deg);
}

.book {
  position: relative;
  z-index: 3;
  display: none;
  width: min(1080px, 86vw);
  height: auto;
  min-height: 0;
  aspect-ratio: 1480 / 820;
}

.book-art {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  pointer-events: none;
}

.book-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 180ms ease-out;
}

.answer-shown .book-art img {
  opacity: 0;
}

.answer-shown .paper-noise {
  opacity: 0.12;
}

.answer-shown .intro-copy,
.answer-shown .ritual-guide,
.answer-shown .ink-orbit,
.answer-shown .gold-fleck,
.answer-shown .reveal-modes,
.answer-shown .library-note,
.answer-shown .edge-history {
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease-out;
}

.answer-shown .intro-copy,
.answer-shown .question-home {
  display: none;
}

.answer-shown .seo-content {
  display: none;
}

.answer-shown .book-stage {
  justify-content: center;
  padding-top: 84px;
  padding-bottom: 40px;
}

.answer-shown .topbar {
  opacity: 0.62;
  transition: opacity 160ms ease-out;
}

.answer-shown .book {
  display: block;
  width: min(1240px, 92vw);
}

.book-shadow {
  display: none;
}

.page {
  position: absolute;
  z-index: 2;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.page-answer {
  top: 9%;
  left: 12%;
  width: 34%;
  height: 78%;
  transform: none;
}

.page-question {
  top: 9%;
  left: 55%;
  width: 33%;
  height: 78%;
  transform: none;
}

.book-fold {
  display: none;
}

.page-curl {
  display: none;
}

.book:hover .page-curl {
  transform: none;
}

.ghost-ink {
  position: absolute;
  inset: 22% 5%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 13px;
  color: rgba(30, 29, 25, 0.26);
  font-family: var(--serif);
  font-size: clamp(25px, 2.5vw, 38px);
  line-height: 1.45;
  opacity: 1;
  transform: rotate(-2deg);
  transition: opacity 180ms ease-out;
}

.ghost-ink span {
  text-align: center;
}

.ghost-ink small {
  color: rgba(30, 29, 25, 0.28);
  font-size: 10px;
}

.answer-reveal {
  position: absolute;
  z-index: 4;
  inset: 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}

.book.answered .page-answer {
  top: 2%;
  left: 5%;
  width: 90%;
  height: 96%;
  z-index: 8;
}

.book.answered .page-question {
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease-out;
}

.book.answered .seal-wrap {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.answer-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.answer-reveal.visible + * {
  opacity: 0;
}

.answer-theme {
  margin: 0 0 22px;
  color: rgba(23, 23, 20, 0.46);
  font-family: var(--art);
  font-size: 12px;
}

.answer-reveal blockquote {
  position: relative;
  max-width: 100%;
  margin: 0;
  padding: 0 56px;
  font-family: var(--art);
  font-size: clamp(48px, 5.8vw, 88px);
  font-weight: 900;
  line-height: 1.38;
  text-wrap: pretty;
}

html[lang="en"] .answer-reveal blockquote {
  font-size: clamp(32px, 4.8vw, 72px);
  line-height: 1.3;
}

.answer-reveal blockquote::before,
.answer-reveal blockquote::after {
  position: absolute;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 94px;
  font-weight: 700;
  line-height: 1;
  content: "“";
}

.answer-reveal blockquote::before {
  top: -24px;
  left: 0;
}

.answer-reveal blockquote::after {
  right: 0;
  bottom: -42px;
  content: "”";
}

.answer-number {
  margin: 24px 0 0;
  color: rgba(23, 23, 20, 0.38);
  font-family: Georgia, serif;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.next-practice {
  width: min(430px, 100%);
  margin-top: 22px;
  border-top: 1px solid rgba(23, 23, 20, 0.18);
  padding-top: 13px;
  text-align: left;
}

.next-practice > p {
  margin: 0 0 8px;
  color: rgba(23, 23, 20, 0.52);
  font-family: var(--art);
  font-size: 11px;
}

.next-practice a {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--ink);
  text-decoration: none;
}

.next-practice a span {
  display: grid;
  gap: 3px;
}

.next-practice a b {
  font-family: var(--art);
  font-size: 16px;
  font-weight: 600;
}

.next-practice a small {
  color: rgba(23, 23, 20, 0.62);
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.5;
  text-wrap: pretty;
}

.next-practice a i {
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(23, 23, 20, 0.42);
  padding: 5px 1px;
  color: rgba(23, 23, 20, 0.62);
  font-family: var(--art);
  font-size: 11px;
  font-style: normal;
  transition: color 160ms ease-out, transform 160ms ease-out;
}

.next-practice a:hover i {
  color: var(--ink);
  transform: translateX(2px);
}

.ask-again {
  min-height: 44px;
  margin-top: 7px;
  border: 0;
  border-bottom: 1px solid rgba(23, 23, 20, 0.4);
  padding: 0 6px;
  color: rgba(23, 23, 20, 0.58);
  background: transparent;
  font-family: var(--art);
  font-size: 12px;
  cursor: pointer;
  transition: color 160ms ease-out, transform 160ms ease-out;
}

.ask-again:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.question-field {
  position: absolute;
  right: 4%;
  bottom: 18%;
  left: 4%;
  display: grid;
  gap: 7px;
}

.question-kicker {
  color: rgba(23, 23, 20, 0.42);
  font-family: var(--serif);
  font-size: 11px;
  text-align: center;
}

.question-field input {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 0;
  padding: 0 8px;
  color: var(--ink);
  outline: 0;
  background: transparent;
  font-family: var(--serif);
  font-size: 16px;
  text-align: center;
}

.question-field input::placeholder {
  color: rgba(23, 23, 20, 0.54);
  opacity: 1;
}

.question-line {
  display: block;
  height: 1px;
  background: rgba(23, 23, 20, 0.28);
  transform: scaleX(1);
  transition: transform 180ms ease-out, background-color 180ms ease-out;
}

.question-field:focus-within .question-line {
  background: var(--gold);
  transform: scaleX(0.94);
}

.seal-wrap {
  position: absolute;
  z-index: 10;
  top: 52%;
  left: 50%;
  display: grid;
  justify-items: center;
  transform: translate(-50%, -50%);
}

.open-seal {
  position: relative;
  display: grid;
  width: 100px;
  height: 100px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: #f5f0e4;
  background: #24231f;
  box-shadow: 0 12px 24px rgba(37, 31, 22, 0.26), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  cursor: pointer;
  user-select: none;
  touch-action: none;
  transition: transform 160ms ease-out, box-shadow 160ms ease-out;
}

.open-seal::before {
  position: absolute;
  inset: -15px;
  border: 1px solid rgba(23, 23, 20, 0.62);
  border-right-color: var(--gold);
  border-radius: 50%;
  content: "";
  transform: rotate(var(--progress-angle, 0deg));
}

.open-seal::after {
  position: absolute;
  top: -19px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  content: "";
}

.open-seal:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(37, 31, 22, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.open-seal:active,
.open-seal.holding {
  transform: scale(0.96);
}

.seal-label {
  font-family: var(--serif);
  font-size: 20px;
}

.seal-progress {
  position: absolute;
  bottom: 16px;
  color: rgba(245, 240, 228, 0.58);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  opacity: 0;
}

.open-seal.holding .seal-progress {
  opacity: 1;
}

.hold-hint {
  position: absolute;
  top: 76px;
  padding: 3px 8px;
  background: rgba(242, 239, 231, 0.82);
  width: 220px;
  margin: 0;
  color: rgba(23, 23, 20, 0.55);
  font-family: var(--serif);
  font-size: 12px;
  text-align: center;
  pointer-events: none;
}

.reveal-modes {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 50px;
}

.reveal-modes button {
  min-height: 44px;
  border: 0;
  padding: 0 4px;
  background: transparent;
  font-family: var(--serif);
  font-size: 14px;
  cursor: pointer;
  transition: color 160ms ease-out, transform 160ms ease-out;
}

.reveal-modes button:hover {
  color: var(--gold);
  transform: translateY(-1px);
}

.reveal-modes span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.library-note {
  position: relative;
  z-index: 3;
  margin: 5px 0 0;
  color: rgba(23, 23, 20, 0.54);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.edge-history {
  position: fixed;
  z-index: 10;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(46px, env(safe-area-inset-bottom));
  display: grid;
  width: 28px;
  justify-items: center;
  gap: 13px;
  border: 0;
  padding: 0;
  color: rgba(23, 23, 20, 0.42);
  background: transparent;
  cursor: pointer;
}

.edge-history span {
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.5;
  writing-mode: vertical-rl;
}

.edge-history b {
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.edge-history i {
  position: relative;
  width: 1px;
  height: 90px;
  background: rgba(23, 23, 20, 0.18);
}

.edge-history i::after {
  position: absolute;
  right: -3px;
  bottom: -2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.history-dialog,
.confirm-dialog {
  border: 1px solid rgba(23, 23, 20, 0.15);
  color: var(--ink);
  background: #f7f3e9;
  box-shadow: 0 24px 60px rgba(40, 34, 24, 0.22);
}

.history-dialog::backdrop,
.confirm-dialog::backdrop {
  background: rgba(42, 37, 29, 0.3);
}

.history-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 40px));
  padding: 0;
}

.dialog-head,
.dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
}

.dialog-head {
  border-bottom: 1px solid rgba(23, 23, 20, 0.12);
}

.dialog-head p,
.dialog-foot p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
}

.dialog-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  text-wrap: balance;
}

.dialog-close {
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 300;
}

.history-list {
  max-height: min(540px, calc(100dvh - 240px));
  overflow-y: auto;
  padding: 0 24px;
}

.history-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: var(--muted);
  text-align: center;
}

.history-empty p {
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
}

.history-item {
  padding: 20px 0;
  border-bottom: 1px solid rgba(23, 23, 20, 0.1);
}

.history-item:last-child {
  border-bottom: 0;
}

.history-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.history-question {
  margin: 9px 0 5px;
  font-size: 12px;
}

.history-answer {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.7;
  text-wrap: pretty;
}

.dialog-foot {
  border-top: 1px solid rgba(23, 23, 20, 0.12);
}

.dialog-foot p {
  margin: 0;
}

.text-button {
  min-height: 44px;
  border: 1px solid rgba(23, 23, 20, 0.16);
  padding: 0 15px;
  background: transparent;
  cursor: pointer;
}

.text-button:hover {
  background: rgba(23, 23, 20, 0.05);
}

.text-button.danger {
  color: #8a3029;
}

.confirm-dialog {
  width: min(410px, calc(100vw - 32px));
  padding: 0;
}

.confirm-dialog form {
  padding: 24px;
}

.confirm-dialog h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  text-wrap: balance;
}

.confirm-dialog p {
  margin: 12px 0 22px;
  color: var(--muted);
  line-height: 1.6;
  text-wrap: pretty;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.eyes-overlay {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  color: #eee8da;
  background: #181713;
  text-align: center;
}

.eyes-overlay[hidden] {
  display: none;
}

.eyes-overlay p {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
}

.eyes-overlay strong {
  margin: 20px 0;
  font-family: Georgia, serif;
  font-size: 86px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.eyes-overlay small {
  color: rgba(238, 232, 218, 0.6);
  font-family: var(--serif);
}

.eyes-overlay button {
  min-width: 88px;
  min-height: 44px;
  margin-top: 38px;
  border: 1px solid rgba(238, 232, 218, 0.3);
  color: #eee8da;
  background: transparent;
  cursor: pointer;
}

.eyes-ripple {
  position: absolute;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(181, 154, 98, 0.26);
  border-radius: 50%;
  animation: eyes-pulse 1.6s ease-out infinite;
}

.toast {
  position: fixed;
  z-index: 50;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  max-width: min(360px, calc(100vw - 36px));
  padding: 10px 14px;
  color: var(--paper-light);
  background: rgba(23, 23, 20, 0.92);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.book.shaking {
  animation: book-shake 180ms ease-out 2;
}

@keyframes eyes-pulse {
  0% { opacity: 0.2; transform: scale(0.72); }
  70% { opacity: 0.5; }
  100% { opacity: 0; transform: scale(1.2); }
}

@keyframes book-shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  33% { transform: translateX(-7px) rotate(-0.5deg); }
  66% { transform: translateX(7px) rotate(0.5deg); }
}

@media (max-height: 820px) and (min-width: 761px) {
  .book-stage {
    justify-content: flex-start;
    padding-top: 100px;
  }

  .intro-copy {
    margin-bottom: 18px;
  }

  .intro-copy h1 {
    font-size: 40px;
  }

  .subtitle {
    margin-top: 10px;
  }

  .ritual-guide {
    margin-top: 12px;
  }

  .book {
    width: min(900px, 84vw);
    height: auto;
  }

  .reveal-modes {
    margin-top: 34px;
  }
}

@media (max-width: 760px) {
  .answer-app {
    overflow-y: auto;
  }

  .topbar {
    position: relative;
    min-height: 70px;
    padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  }

  .wordmark-cn {
    font-size: 18px;
  }

  .wordmark-year {
    display: none;
  }

  .language-switcher {
    gap: 5px;
    font-size: 11px;
  }

  .language-switcher a {
    min-width: 22px;
  }

  .current-module {
    padding-bottom: 8px;
    font-size: 15px;
  }

  html[lang="en"] .current-module {
    font-size: 14px;
    white-space: nowrap;
  }

  .top-actions {
    gap: 2px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .book-stage {
    min-height: calc(100dvh - 70px);
    justify-content: flex-start;
    padding: 42px 16px max(32px, env(safe-area-inset-bottom));
  }

  .intro-copy {
    margin-bottom: 26px;
  }

  .eyebrow {
    margin-bottom: 10px;
    font-size: 13px;
  }

  .eyebrow i {
    width: 26px;
  }

  .intro-copy h1 {
    max-width: 350px;
    font-size: 44px;
    line-height: 1.12;
  }

  .intro-copy h1 span,
  .intro-copy h1 em {
    display: block;
  }

  .subtitle {
    max-width: 290px;
    margin-top: 12px;
    font-size: 13px;
  }

  .question-home {
    padding: 22px 2px 20px;
  }

  .instruction-list {
    gap: 17px;
  }

  .instruction-list li {
    grid-template-columns: 30px 1fr;
    gap: 11px;
  }

  .instruction-list li > span {
    width: 27px;
    height: 27px;
    font-size: 12px;
  }

  .instruction-list p {
    font-size: 14px;
    line-height: 1.7;
  }

  .instruction-list small {
    font-size: 11px;
  }

  .view-answer {
    width: 100%;
    min-height: 50px;
    margin-top: 22px;
  }

  .seo-content {
    width: calc(100% - 32px);
    padding: 52px 0 max(64px, env(safe-area-inset-bottom));
  }

  .seo-content h2 {
    font-size: 32px;
  }

  .seo-intro {
    font-size: 14px;
  }

  .faq-list {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .faq-list article {
    padding: 20px 0 22px;
  }

  .related-tools {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4px 18px;
  }

  .related-tools p {
    width: 100%;
    margin-bottom: 4px;
  }

  .answer-shown .book-stage {
    min-height: calc(100dvh - 70px);
    padding: 30px 10px max(24px, env(safe-area-inset-bottom));
  }

  .ritual-guide {
    gap: 7px;
    margin-top: 16px;
    font-size: 10px;
  }

  .ritual-guide span {
    gap: 4px;
  }

  .ritual-guide b {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }

  .ritual-guide > i {
    width: 10px;
  }

  .ink-orbit {
    top: 41%;
    width: 145vw;
    aspect-ratio: 1.25;
  }

  .gold-fleck {
    top: 43%;
    left: 5%;
    width: 26px;
    height: 12px;
  }

  .book {
    width: min(92vw, 400px);
    height: auto;
    min-height: 0;
    aspect-ratio: 800 / 1218;
  }

  .page-answer {
    top: 5%;
    left: 12%;
    width: 76%;
    height: 41%;
  }

  .page-question {
    top: 50%;
    left: 12%;
    width: 76%;
    height: 42%;
  }

  .book-fold {
    top: calc(56% - 2px);
  }

  .seal-wrap {
    top: 48.2%;
  }

  .open-seal {
    width: 84px;
    height: 84px;
  }

  .open-seal::before {
    inset: -12px;
  }

  .open-seal::after {
    top: -16px;
  }

  .seal-label {
    font-size: 17px;
  }

  .seal-progress {
    bottom: 12px;
  }

  .hold-hint {
    top: 99px;
  }

  .answer-reveal {
    inset: 7% 4%;
  }

  .book.answered .page-answer {
    top: 0;
    left: 4%;
    width: 92%;
    height: 100%;
  }

  .answer-reveal blockquote {
    padding: 0 34px;
    font-size: clamp(34px, 10vw, 46px);
    line-height: 1.45;
  }

  html[lang="en"] .answer-reveal blockquote {
    font-size: clamp(27px, 8vw, 38px);
    line-height: 1.35;
  }

  .answer-reveal blockquote::before,
  .answer-reveal blockquote::after {
    font-size: 44px;
  }

  .answer-reveal blockquote::before {
    top: -15px;
  }

  .answer-reveal blockquote::after {
    bottom: -27px;
  }

  .answer-theme {
    margin-bottom: 12px;
  }

  .answer-number {
    margin-top: 14px;
  }

  .ask-again {
    min-height: 38px;
    margin-top: 4px;
  }

  .question-field {
    right: 3%;
    bottom: 24%;
    left: 3%;
  }

  .question-kicker {
    font-size: 10px;
  }

  .question-field input {
    font-size: 16px;
  }

  .reveal-modes {
    gap: 12px;
    margin-top: 36px;
  }

  .reveal-modes button {
    font-size: 13px;
  }

  .edge-history {
    display: none;
  }

  .library-note {
    text-align: center;
  }
}

@media (max-width: 390px) {
  .book-stage {
    padding-right: 10px;
    padding-left: 10px;
  }

  .book {
    width: 94vw;
  }

  .reveal-modes {
    gap: 7px;
  }

  .reveal-modes button {
    padding-right: 1px;
    padding-left: 1px;
    font-size: 12px;
  }
}

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