@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Noto+Serif+SC:wght@500;600;700;900&display=swap");

:root {
  --bg: #f6f5f1;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --ink: #111111;
  --muted: #636363;
  --soft: #ece9df;
  --line: rgba(17, 17, 17, 0.1);
  --line-strong: rgba(17, 17, 17, 0.18);
  --accent: #f8c034;
  --accent-soft: rgba(248, 192, 52, 0.06);
  --success: #0d7a2d;
  --shadow: 0 20px 80px rgba(17, 17, 17, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --content-width: min(1240px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fbfaf7 0%, #f4f2ec 100%);
  min-height: 100vh;
}

body.is-modal-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

button,
textarea {
  font: inherit;
}

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

.page-shell {
  position: relative;
  z-index: 1;
  width: var(--content-width);
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 16px;
  z-index: 20;
  padding: 14px 18px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(17, 17, 17, 0.05);
}

.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brandmark__badge {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(17, 17, 17, 0.12);
}

.brandmark__copy {
  display: grid;
  gap: 2px;
}

.brandmark__copy strong {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.brandmark__copy span {
  color: var(--muted);
  font-size: 0.86rem;
}

.wallet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.wallet-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.16);
}

.wallet-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.wallet-button__vip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wallet-button__vip svg {
  width: 20px;
  height: 20px;
  fill: #f3c842;
  filter: drop-shadow(0 2px 6px rgba(243, 200, 66, 0.32));
}

.wallet-button__icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.wallet-button__label {
  font-size: 0.95rem;
  font-weight: 700;
}

.hero-card {
  position: relative;
  padding: 0 28px 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.8)),
    repeating-linear-gradient(
      -45deg,
      rgba(17, 17, 17, 0.015),
      rgba(17, 17, 17, 0.015) 14px,
      transparent 14px,
      transparent 28px
    );
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: calc(var(--radius-xl) - 8px);
  border: 1px dashed rgba(17, 17, 17, 0.08);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(380px, 1fr);
  gap: 34px;
  align-items: center;
  padding-top: 116px;
}

.cover-panel {
  position: relative;
  padding: 24px;
}

.cover-panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(17, 17, 17, 0.12), transparent 34%),
    linear-gradient(160deg, rgba(17, 17, 17, 0.04), rgba(17, 17, 17, 0));
}

.cover-frame {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 3 / 4;
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(160deg, #f9f7f2 0%, #e9e4d6 100%);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 24px 48px rgba(17, 17, 17, 0.12);
  overflow: hidden;
}

.cover-image {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  bottom: 18px;
  width: calc(100% - 36px);
  height: calc(100% - 36px);
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid rgba(17, 17, 17, 0.08);
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.cover-image.active {
  opacity: 1;
}

.story-panel {
  position: relative;
  display: grid;
  gap: 22px;
}

.story-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 18px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-eyebrow::before {
  content: "";
  width: 38px;
  height: 1px;
  background: currentColor;
}

.story-panel h1,
.section-heading h2,
.modal__toolbar h3 {
  margin: 8px 0 0;
  font-family: "Noto Serif SC", "STSong", serif;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}

.story-panel h1 {
  font-size: clamp(2.5rem, 4vw, 4rem);
}

.story-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.story-intro,
.section-heading p,
.hero-note,
.claimer-meta span,
.meta-item span,
.reader-status,
.reflection-meta,
.wallet-hint {
  color: var(--muted);
}

.story-intro {
  margin: 0;
  font-size: 1rem;
  line-height: 1.82;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.meta-item {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  min-height: 96px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.meta-item strong {
  font-size: 1rem;
  line-height: 1.55;
}

.hero-actions,
.card-actions,
.reflection-footer,
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.button--primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 12px 24px rgba(248, 192, 52, 0.24);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border-color: var(--line-strong);
}

.button--text {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.hero-note {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.8;
}

.hero-barrage {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: grid;
  gap: 14px;
  padding: 8px 0 0;
  overflow: hidden;
  pointer-events: none;
}

.barrage-lane {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.barrage-marquee {
  display: flex;
  align-items: center;
  gap: 20px;
  width: max-content;
  animation: barrage-loop var(--duration, 68s) linear infinite;
  will-change: transform;
}

.barrage-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.72);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  white-space: nowrap;
  pointer-events: auto;
}

.barrage-item:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(17, 17, 17, 0.88);
}

.barrage-item__avatar,
.claimer-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
  border: 1px solid rgba(17, 17, 17, 0.12);
}

.barrage-item__label {
  font-size: 0.88rem;
  font-weight: 700;
}

.barrage-item__meta {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.72);
}

.insights-section {
  padding: 42px 0 0;
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading h2 {
  font-size: clamp(2rem, 3.4vw, 3rem);
}

.insights-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 26px;
  border-bottom: 2px solid var(--line);
}

.insights-tab {
  padding: 12px 24px;
  border: 0;
  background: transparent;
  color: var(--ink-light);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.insights-tab:hover {
  color: var(--ink);
}

.insights-tab--active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  min-height: 60vh;
}

.empty-state__icon {
  color: var(--ink-light);
  margin-bottom: 24px;
  opacity: 0.4;
}

.empty-state__message {
  font-size: 1.1rem;
  color: var(--ink-light);
  font-weight: 500;
}

.section-heading p {
  max-width: 520px;
  margin: 0;
  line-height: 1.78;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.insight-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(17, 17, 17, 0.06);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.insight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px rgba(17, 17, 17, 0.09);
}

.insight-card.is-focused {
  border-color: rgba(17, 17, 17, 0.24);
  box-shadow: 0 0 0 6px rgba(17, 17, 17, 0.06);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-serial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.card-price {
  font-size: 0.92rem;
  font-weight: 800;
}

.quote-frame {
  position: relative;
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 320px;
  padding: 26px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.04), rgba(17, 17, 17, 0.02)),
    linear-gradient(180deg, #fefefe 0%, #f0ede5 100%);
  overflow: hidden;
}

.quote-frame::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 18px;
  border: 1px dashed rgba(17, 17, 17, 0.08);
}

.quote-context,
.quote-focus {
  position: relative;
  z-index: 1;
}

.quote-context {
  font-family: "Noto Serif SC", "STSong", serif;
  font-size: 1rem;
  line-height: 1.95;
  color: rgba(17, 17, 17, 0.42);
}

.quote-focus {
  font-family: "Noto Serif SC", "STSong", serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.95;
  color: var(--ink);
}

.claimer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(17, 17, 17, 0.03);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.claimer.is-claimed {
  background: rgba(17, 17, 17, 0.08);
  border-color: rgba(17, 17, 17, 0.18);
}

.claimer.is-claimed .claimer-avatar {
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08);
}

.claimer-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reflection-snippet {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.reflection-snippet strong {
  font-size: 0.88rem;
}

.reflection-snippet p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reflection-snippet.is-empty p {
  color: rgba(17, 17, 17, 0.42);
}

.reflection-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.reflection-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.reflection-item:first-child {
  padding-top: 0;
}

.reflection-author {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}

.reflection-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}


.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  overscroll-behavior: contain;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.42);
  backdrop-filter: blur(12px);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  max-height: calc(100vh - 40px);
  display: grid;
  gap: 18px;
  padding: 22px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(250, 249, 245, 0.96);
  box-shadow: 0 28px 90px rgba(17, 17, 17, 0.24);
}

.modal__dialog--reflection {
  width: min(700px, 100%);
}

.modal__dialog--reader {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.modal__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.modal__toolbar h3 {
  font-size: clamp(1.4rem, 2.2vw, 2.1rem);
}

.modal-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.modal-icon-button:hover {
  transform: rotate(90deg);
  border-color: var(--line-strong);
  background: #ffffff;
}

.modal-icon-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.reader-status {
  font-size: 0.92rem;
}

.reader-article {
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
  font-size: 1rem;
  line-height: 1.9;
}

.reader-article > *:first-child {
  margin-top: 0;
}

.reader-article h1,
.reader-article h2,
.reader-article h3 {
  font-family: "Noto Serif SC", "STSong", serif;
  margin-top: 1.75em;
  margin-bottom: 0.7em;
}

.reader-article h1 {
  font-size: 2rem;
}

.reader-article h2 {
  font-size: 1.48rem;
}

.reader-article h3 {
  font-size: 1.18rem;
}

.reader-article p,
.reader-article li {
  color: rgba(17, 17, 17, 0.84);
}

.reader-article ul {
  padding-left: 1.3em;
}

.reader-anchor {
  background: rgba(17, 17, 17, 0.12);
  color: var(--ink);
  padding: 0.08em 0.2em;
  border-radius: 0.35em;
  box-shadow: 0 0 0 6px rgba(17, 17, 17, 0.05);
}

.reflection-meta {
  margin: -4px 0 0;
  font-size: 0.94rem;
  line-height: 1.7;
}

.reflection-editor {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--ink);
  line-height: 1.82;
  outline: none;
}

.reflection-editor:focus {
  border-color: rgba(17, 17, 17, 0.32);
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.06);
}

.listing-form {
  margin: 18px 0;
}

.listing-label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
}

.listing-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 1.1rem;
  font-family: inherit;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.listing-input:focus {
  outline: none;
  border-color: rgba(17, 17, 17, 0.32);
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.06);
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  gap: 10px;
}

.toast {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(17, 17, 17, 0.92);
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(17, 17, 17, 0.2);
  animation: toast-in 0.22s ease;
}

@keyframes barrage-loop {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-25%);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .story-panel__header,
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .insights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --content-width: min(100vw - 20px, 100%);
  }

  .page-shell {
    padding-top: 12px;
    padding-bottom: 32px;
  }

  .topbar {
    top: 10px;
    padding: 12px 14px;
    border-radius: 24px;
  }

  .brandmark__copy span {
    display: none;
  }

  .wallet-button {
    min-height: 46px;
    padding: 0 14px;
  }

  .wallet-button__label {
    font-size: 0.86rem;
  }

  .wallet-button__vip {
    padding: 5px 8px;
  }

  .hero-card {
    padding: 0 18px 18px;
  }

  .cover-panel {
    padding: 10px 0 0;
  }

  .meta-grid,
  .insights-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding-top: 108px;
  }

  .barrage-item {
    min-height: 36px;
    padding-right: 12px;
  }

  .quote-frame {
    min-height: 260px;
    padding: 22px;
  }

  .quote-focus {
    font-size: 1rem;
  }

  .modal {
    padding: 10px;
  }

  .modal__dialog {
    max-height: calc(100vh - 20px);
    padding: 18px;
    border-radius: 24px;
  }

  .modal__toolbar {
    align-items: center;
    flex-direction: row;
  }

  .toolbar-actions,
  .reflection-footer,
  .hero-actions,
  .card-actions {
    width: 100%;
  }

  .toolbar-actions .button,
  .reflection-footer .button,
  .hero-actions .button,
  .card-actions .button {
    flex: 1 1 180px;
  }

  .reader-article {
    font-size: 0.96rem;
  }
}

.listing-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.listing-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
}

.listing-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.2s ease;
}

.listing-input:focus {
  outline: none;
  border-color: var(--accent);
}

.listing-input::placeholder {
  color: var(--ink-light);
}
