:root {
  --ink: #111111;
  --soft-ink: #646464;
  --line: #1d1d1d;
  --paper: #ffffff;
  --pale-paper: #fbfbfb;
  --answer-item-height: 86px;
  --answer-width: 100%;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans SC",
    system-ui,
    sans-serif;
}

button {
  font: inherit;
}

.background-flow {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.flow-line {
  position: absolute;
  top: -62vh;
  left: var(--x);
  max-height: 60vh;
  color: #101010;
  font-size: var(--size);
  line-height: 1.85;
  letter-spacing: 0;
  opacity: var(--opacity);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  transform: translateY(-20vh);
  animation: flowDown var(--duration) linear infinite;
  animation-delay: var(--delay);
  will-change: transform;
}

@keyframes flowDown {
  from {
    transform: translateY(-34vh);
  }

  to {
    transform: translateY(164vh);
  }
}

.page-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 54px 18px 42px;
}

.masthead {
  position: relative;
  isolation: isolate;
  width: 100%;
  margin: 0 0 30px;
  text-align: center;
}

.masthead::before {
  position: absolute;
  inset: -18px 50% -14px auto;
  z-index: -1;
  width: min(100%, 620px);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  content: "";
  transform: translateX(50%);
}

.masthead h1 {
  margin: 0;
  color: #050505;
  font-family:
    "Songti SC",
    "SimSun",
    "Noto Serif CJK SC",
    serif;
  font-size: 3rem;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0;
}

.subtitle {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0 0;
  color: #7a7a7a;
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: 0;
}

.subtitle::before,
.subtitle::after {
  display: block;
  width: 42px;
  height: 1px;
  background: #d8d8d8;
  content: "";
}

.oracle {
  display: flex;
  width: min(100%, 660px);
  flex-direction: column;
  align-items: center;
}

.answer-card {
  position: relative;
  width: var(--answer-width);
  padding: 20px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.answer-card::before,
.answer-card::after {
  position: absolute;
  right: 18px;
  left: 18px;
  z-index: 2;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  content: "";
}

.answer-card::before {
  top: calc(20px + var(--answer-item-height));
}

.answer-card::after {
  bottom: calc(20px + var(--answer-item-height));
}

.answer-viewport {
  position: relative;
  height: calc(var(--answer-item-height) * 3);
  overflow: hidden;
}

.answer-track {
  transform: translateY(0);
  will-change: transform, filter, opacity;
}

.answer-item {
  display: flex;
  height: var(--answer-item-height);
  margin: 0;
  padding: 0 10px;
  align-items: center;
  justify-content: center;
  color: #202020;
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.62;
  letter-spacing: 0;
  text-align: center;
}

.answer-item.is-ghost {
  color: #9a9a9a;
  opacity: 0.24;
  filter: blur(1px);
  font-weight: 400;
}

.answer-item.is-active {
  color: #111111;
  opacity: 1;
  filter: none;
}

.answer-card.is-rolling {
  border-color: #565656;
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.answer-card.is-rolling .answer-item {
  opacity: 0.58;
  filter: blur(1.2px);
}

.answer-track.is-settled .answer-item.is-active {
  animation: answerSettle 240ms ease-out both;
}

@keyframes answerSettle {
  from {
    opacity: 0.42;
    filter: blur(1.2px);
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

.ask-button {
  min-width: 178px;
  margin-top: 30px;
  padding: 14px 28px 15px;
  border: 1.5px solid #111111;
  border-radius: 10px;
  background: #ffffff;
  color: #111111;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  font-size: 1.16rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.ask-button:hover {
  background: #111111;
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

.ask-button:active {
  transform: translateY(1px);
}

.ask-button:disabled {
  background: #f3f3f3;
  color: #565656;
  cursor: wait;
  transform: none;
}

.ask-button:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 4px;
}

.hint {
  margin: 14px 0 0;
  color: #8a8a8a;
  font-size: 0.84rem;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: center;
}

@media (min-width: 560px) {
  :root {
    --answer-item-height: 92px;
    --answer-width: min(100%, 640px);
  }

  .page-shell {
    padding: 68px 28px 54px;
  }

  .masthead {
    margin-bottom: 34px;
  }

  .masthead h1 {
    font-size: 4rem;
  }

  .subtitle {
    gap: 18px;
    margin-top: 16px;
    font-size: 1.15rem;
  }

  .subtitle::before,
  .subtitle::after {
    width: 66px;
  }

  .answer-card {
    padding: 26px 26px;
    border-radius: 18px;
  }

  .answer-card::before {
    top: calc(26px + var(--answer-item-height));
  }

  .answer-card::after {
    bottom: calc(26px + var(--answer-item-height));
  }

  .answer-item {
    padding: 0 24px;
    font-size: 1.22rem;
    line-height: 1.68;
  }

  .ask-button {
    min-width: 198px;
    margin-top: 34px;
    padding: 16px 34px 17px;
    font-size: 1.24rem;
  }
}

@media (min-width: 900px) {
  :root {
    --answer-item-height: 96px;
  }

  .masthead h1 {
    font-size: 4.55rem;
  }

  .answer-card {
    padding: 28px 30px;
  }

  .answer-card::before {
    top: calc(28px + var(--answer-item-height));
  }

  .answer-card::after {
    bottom: calc(28px + var(--answer-item-height));
  }

  .answer-item {
    font-size: 1.32rem;
  }
}

@media (max-width: 380px) {
  :root {
    --answer-item-height: 96px;
  }

  .page-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .masthead h1 {
    font-size: 2.62rem;
  }

  .subtitle {
    gap: 10px;
    font-size: 0.95rem;
  }

  .subtitle::before,
  .subtitle::after {
    width: 30px;
  }

  .answer-item {
    font-size: 1rem;
    line-height: 1.58;
  }

  .ask-button {
    width: min(100%, 240px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .flow-line {
    animation-duration: 120s;
  }

  .answer-track.is-settled .answer-item.is-active {
    animation: none;
  }

  .ask-button {
    transition: none;
  }
}
