  * { margin: 0; padding: 0; box-sizing: border-box; }
  :root { --ink: #1a1410; --paper: #f4ecd8; --blood: #c8341e; --gold: #d4a843; --mute: #8a7d68; }
  html, body {
    min-height: 100%; overflow: hidden;
    font-family: "Noto Serif SC", serif;
    background: var(--paper); color: var(--ink);
    -webkit-tap-highlight-color: transparent;
  }
  button, a { -webkit-tap-highlight-color: transparent; }
  button { user-select: none; }
  button:focus-visible, a:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
  }
  body::before {
    content: ""; position: fixed; inset: 0;
    background-image:
      radial-gradient(circle at 20% 30%, rgba(200, 52, 30, 0.04) 0%, transparent 40%),
      radial-gradient(circle at 80% 70%, rgba(212, 168, 67, 0.06) 0%, transparent 40%),
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.85' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/></svg>");
    pointer-events: none; z-index: 1;
  }
  .border-frame {
    position: fixed; inset: 12px;
    border: 2px solid var(--ink);
    pointer-events: none; z-index: 2;
  }
  .border-frame::before {
    content: ""; position: absolute; inset: 4px; border: 1px solid var(--ink);
  }

  /* ============ 通用页 ============ */
  .page {
    position: fixed; inset: 0; z-index: 5;
    display: none; flex-direction: column;
    transition: opacity 0.3s ease;
    overflow-x: hidden; overflow-y: auto;
    overscroll-behavior: contain;
  }
  .page.active { display: flex; }
  .page.fade-in { animation: pageFade 0.4s ease both; }
  @keyframes pageFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ============ 心情页 ============ */
  #moodPage {
    align-items: center; justify-content: flex-start;
    padding: 76px 28px calc(40px + env(safe-area-inset-bottom));
  }
  .mood-corner {
    position: absolute; top: 28px; left: 24px;
    font-family: "Noto Serif SC", serif; font-weight: 900;
    font-size: 11px; letter-spacing: 0.15em; opacity: 0.7;
  }
  .mood-corner span { color: var(--blood); }
  .brand-mark {
    position: absolute; top: 28px; right: 24px;
    font-family: "Bebas Neue", sans-serif;
    font-size: 11px; letter-spacing: 0.3em; opacity: 0.5;
  }
  .mood-content {
    width: 100%; min-height: calc(100dvh - 116px);
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
  }
  .mood-prompt {
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: clamp(32px, 8vw, 56px);
    color: var(--ink); margin-bottom: 16px;
    text-align: center; line-height: 1.18;
  }
  .mood-prompt em {
    font-style: normal; color: var(--blood);
    position: relative; display: inline-block;
  }
  .mood-prompt em::after {
    content: ""; position: absolute;
    left: 0; right: 0; bottom: -5px; height: 3px;
    background: var(--blood); transform: rotate(-2deg);
  }
  .mood-sub {
    font-size: 14px; letter-spacing: 0.08em;
    opacity: 0.68; margin-bottom: 18px;
    text-align: center; line-height: 1.7;
  }
  .mood-example {
    width: min(100%, 420px); margin-bottom: 24px;
    padding: 12px 16px; border-left: 3px solid var(--blood);
    background: rgba(255,255,255,0.46);
  }
  .mood-example span {
    display: block; margin-bottom: 4px;
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: 10px; letter-spacing: 0.22em; color: var(--blood);
  }
  .mood-example p {
    font-size: 13px; line-height: 1.65;
  }
  .mood-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 14px; width: 100%; max-width: 420px;
  }
  .mood-btn {
    background: var(--paper); border: 2px solid var(--ink); color: var(--ink);
    padding: 22px 16px;
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: 22px; letter-spacing: 0.1em;
    cursor: pointer; transition: all 0.18s ease;
    text-align: center;
  }
  .mood-btn:active { background: var(--ink); color: var(--paper); transform: scale(0.96); }
  .mood-btn small {
    display: block; font-family: "Bebas Neue", sans-serif;
    font-size: 9px; letter-spacing: 0.25em;
    opacity: 0.55; margin-top: 4px;
  }
  .mood-btn:nth-child(5) { grid-column: span 2; }
  .topic-entry {
    width: min(100%, 420px);
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 12px;
    font-size: 11px;
    line-height: 1.5;
  }
  .topic-entry span {
    flex-basis: 100%;
    text-align: center;
    color: var(--mute);
    font-family: "ZCOOL KuaiLe", sans-serif;
    letter-spacing: 0.18em;
  }
  .topic-entry a { color: var(--ink); text-underline-offset: 3px; opacity: 0.68; }
  .topic-entry a:hover, .topic-entry a:focus-visible { color: var(--blood); opacity: 1; }

  #quotePage { padding: 0; }
  .top-bar {
    position: sticky; top: 0; left: 0; right: 0;
    padding: 24px 24px; z-index: 5;
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(to bottom, rgba(244,236,216,0.98) 75%, rgba(244,236,216,0));
  }
  .top-bar .back {
    background: transparent; border: 1px solid var(--ink); color: var(--ink);
    padding: 6px 14px;
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: 10px; letter-spacing: 0.25em;
    cursor: pointer; opacity: 0.7;
  }
  .top-bar .brand {
    font-family: "Bebas Neue", sans-serif;
    font-size: 11px; letter-spacing: 0.3em; opacity: 0.5;
  }
  .top-bar .counter {
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: 10px; letter-spacing: 0.2em;
    opacity: 0.5; text-align: right;
  }
  .top-bar .counter strong {
    display: block; font-size: 18px; color: var(--blood);
    letter-spacing: 0.05em; margin-top: 2px;
  }

  .quote-stage {
    flex: 1; display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    min-height: 350px;
    padding: 30px 28px 24px; cursor: default;
  }
  .style-tag {
    margin-bottom: 22px;
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: 13px; letter-spacing: 0.3em;
    padding: 6px 18px;
    background: var(--ink); color: var(--paper);
    transform: rotate(-2deg);
    box-shadow: 4px 4px 0 var(--blood);
  }
  .index-num {
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: 13px; letter-spacing: 0.2em;
    opacity: 0.5; margin-bottom: 18px;
  }
  .quote-box { position: relative; text-align: center; width: min(100%, 720px); padding: 0 82px; }
  .quote {
    font-family: "ZCOOL KuaiLe", "Noto Serif SC", serif;
    font-weight: 900; line-height: 1.25;
    color: var(--ink); position: relative; z-index: 2;
    letter-spacing: 0.04em;
  }
  .quote.size-xl { font-size: clamp(38px, 9vw, 84px); }
  .quote.size-l { font-size: clamp(32px, 7.5vw, 68px); }
  .quote.size-m { font-size: clamp(26px, 6vw, 54px); }
  .quote.glitch { color: var(--blood); text-shadow: none; }
  .quote.brush { font-family: "Long Cang", "Noto Serif SC", cursive; font-weight: 400; color: var(--ink); letter-spacing: 0.08em; line-height: 1.4; }
  .quote.stamp { color: var(--paper); background: var(--blood); padding: 24px 36px; transform: rotate(-1.5deg); box-shadow: 6px 6px 0 var(--ink); display: inline-block; }
  .seal {
    position: absolute; width: 60px; height: 60px;
    border: 3px solid var(--blood); color: var(--blood);
    font-family: "Noto Serif SC", serif; font-weight: 900;
    font-size: 11px; display: flex;
    align-items: center; justify-content: center;
    transform: rotate(8deg); opacity: 0.85;
    line-height: 1.1; text-align: center; letter-spacing: 0.05em;
  }
  .seal.top-right { top: 0; right: 8px; }
  .seal.bottom-left { bottom: 0; left: 8px; transform: rotate(-12deg); }
  .seal.zuiti-seal {
    font-family: "Bebas Neue", sans-serif;
    font-weight: 400; font-size: 7px; letter-spacing: 0.15em;
    width: 48px; height: 48px;
    bottom: 0; right: 8px;
    transform: rotate(-17deg);
  }

  .also-display {
    margin-top: 32px;
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: 14px; color: var(--ink);
    opacity: 0.75;
    letter-spacing: 0.05em;
  }
  .also-display strong { color: var(--blood); font-weight: 900; }

  .quote-footer {
    position: relative;
    padding: 16px 24px calc(24px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column;
    align-items: center; gap: 12px; z-index: 10;
  }
  .btn-row {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px; width: min(100%, 420px);
  }
  .btn-primary {
    background: var(--ink); color: var(--paper);
    border: none; padding: 15px 12px;
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: 16px; letter-spacing: 0.1em;
    cursor: pointer;
    box-shadow: 5px 5px 0 var(--blood);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  }
  .btn-primary:active { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--blood); }
  .btn-primary.copy-primary { background: var(--blood); box-shadow: 5px 5px 0 var(--ink); }
  .btn-primary.copy-primary:active { box-shadow: 3px 3px 0 var(--ink); }
  .btn-primary.loading { opacity: 0.45; pointer-events: none; }
  .btn-primary.loading, .btn-save.loading, .btn-boost.loading { cursor: wait; }
  .btn-primary:disabled, .btn-save:disabled, .btn-boost:disabled { cursor: not-allowed; }

  .toast {
    position: fixed;
    top: calc(82px + env(safe-area-inset-top)); left: 50%;
    transform: translateX(-50%);
    background: var(--ink); color: var(--paper);
    padding: 10px 20px;
    font-family: "Noto Serif SC", serif;
    font-size: 13px; letter-spacing: 0.05em;
    max-width: calc(100vw - 40px);
    text-align: center; line-height: 1.5;
    z-index: 100;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .toast.show { opacity: 1; }

  /* ============ 动效 ============ */
  .enter { animation: enter 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
  @keyframes enter {
    0% { opacity: 0; transform: translateY(30px) scale(0.92); }
    60% { transform: translateY(-4px) scale(1.02); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
  }
  .enter-d1 { animation-delay: 0.05s; }
  .enter-d2 { animation-delay: 0.15s; }
  .enter-d3 { animation-delay: 0.25s; }
  .enter-d4 { animation-delay: 0.35s; }
  .shake { animation: shake 0.4s ease; }
  @keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-3px, 1px); }
    40% { transform: translate(3px, -1px); }
    60% { transform: translate(-2px, -1px); }
    80% { transform: translate(2px, 2px); }
  }
  .flash {
    position: fixed; inset: 0; background: var(--paper);
    z-index: 200; pointer-events: none; opacity: 0;
  }
  .flash.active { animation: flash 0.3s ease; }
  @keyframes flash {
    0% { opacity: 0; } 20% { opacity: 0.85; } 100% { opacity: 0; }
  }
  .pulse-once { animation: pulseOnce 0.5s ease; }
  @keyframes pulseOnce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
  }

  @media (max-width: 480px) {
    .quote-box { padding-left: 0; padding-right: 54px; }
    .seal.top-right, .seal.bottom-left { display: none; }
    .seal.zuiti-seal { width: 38px; height: 38px; top: 50%; right: 0; bottom: auto; transform: translateY(-50%) rotate(-12deg); }
    .mood-grid { gap: 10px; }
    .mood-btn { padding: 18px 12px; font-size: 19px; }
    #moodPage { padding-left: 22px; padding-right: 22px; }
    .mood-content { justify-content: flex-start; padding-top: 32px; }
    .quote-stage { min-height: 330px; padding-left: 22px; padding-right: 22px; }
    .quote-footer { padding-left: 20px; padding-right: 20px; }
  }

  @media (max-height: 640px) {
    .mood-content { justify-content: flex-start; padding-top: 16px; }
    .mood-prompt { font-size: clamp(28px, 8vw, 40px); }
    .mood-example { margin-bottom: 18px; }
    .topic-entry { margin-top: 14px; }
    .quote-stage { min-height: 300px; }
  }

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

  .btn-save {
    background: transparent;
    border: 1.5px solid var(--ink);
    color: var(--ink);
    padding: 10px 8px;
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: 13px; letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.15s ease;
    opacity: 0.72;
  }
  .btn-save:active { background: var(--ink); color: var(--paper); opacity: 1; }
  .btn-save.loading { opacity: 0.32; pointer-events: none; }
  .btn-save.plus1 { border-color: var(--blood); color: var(--blood); }
  .btn-save.plus1.done { border-color: var(--mute); color: var(--mute); pointer-events: none; }
  .action-row {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px; width: min(100%, 420px);
  }

  #posterModal {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(26, 20, 16, 0.96);
    display: none; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 24px 20px; gap: 14px;
  }
  #posterModal.open { display: flex; }
  #posterImg {
    max-width: min(100%, 380px);
    max-height: 62vh;
    object-fit: contain;
    display: block;
    box-shadow: 0 10px 48px rgba(0,0,0,0.7);
  }
  .poster-close {
    position: absolute; top: 22px; right: 22px;
    color: var(--paper); background: transparent;
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: 10px; letter-spacing: 0.3em;
    cursor: pointer; opacity: 0.55;
    border: 1px solid rgba(244,236,216,0.3);
    padding: 6px 14px;
    transition: opacity 0.15s;
  }
  .poster-close:active { opacity: 1; }
  .poster-hint {
    color: var(--paper);
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: 13px; opacity: 0.55;
    letter-spacing: 0.06em;
  }
  .poster-dl {
    background: var(--paper); color: var(--ink);
    padding: 11px 30px;
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: 14px; letter-spacing: 0.18em;
    text-decoration: none;
    display: inline-block;
    box-shadow: 4px 4px 0 var(--blood);
    cursor: pointer;
  }

  .btn-boost {
    display: none;
    background: transparent;
    border: 1px solid var(--mute);
    color: var(--mute);
    padding: 8px 28px;
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: 13px; letter-spacing: 0.2em;
    cursor: pointer;
    transition: all 0.15s ease;
    opacity: 0.8;
  }
  .btn-boost:active { background: var(--mute); color: var(--paper); opacity: 1; }
  .boost-display {
    display: none;
    text-align: center;
    max-width: 320px;
  }
  .boost-label {
    display: block;
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: 10px; letter-spacing: 0.35em;
    color: var(--blood); opacity: 0.75;
    margin-bottom: 6px;
  }
  .boost-quote {
    font-family: "ZCOOL KuaiLe", sans-serif;
    font-size: 14px; color: var(--ink);
    opacity: 0.75; letter-spacing: 0.05em;
    line-height: 1.5;
  }
