/* ==========================================================================
   花语小助手 · 视觉系统
   暖奶油底色 + 花瓣渐变 + 杂志感排版；无外部字体/图片依赖，离线可用。
   ========================================================================== */

:root {
  --cream: #fff8ef;
  --paper: #fffdf8;
  --paper-strong: #ffffff;
  --ink: #302735;
  --ink-soft: #4a3d52;
  --muted: #7a6d80;
  --line: rgba(73, 52, 84, 0.12);
  --line-strong: rgba(73, 52, 84, 0.2);
  --rose: #e85d75;
  --rose-deep: #c73e5b;
  --coral: #ff8a5c;
  --gold: #f4b942;
  --leaf: #3f8f68;
  --leaf-soft: #dfeee2;
  --teal: #2a9d8f;
  --plum: #7b4b94;
  --blue: #5b8def;
  --danger: #c0392b;
  --danger-soft: #fdecea;
  --safe: #2f7d5b;
  --safe-soft: #e8f5ee;
  --shadow-sm: 0 4px 14px rgba(72, 44, 63, 0.07);
  --shadow-md: 0 16px 40px rgba(92, 53, 73, 0.12);
  --shadow-lg: 0 30px 80px rgba(92, 53, 73, 0.18);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --radius-xl: 42px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-display: "Songti SC", "STSong", "STZhongsong", "SimSun", "Noto Serif SC", Georgia, serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  background:
    radial-gradient(circle at 6% 2%, rgba(255, 191, 207, 0.5), transparent 30rem),
    radial-gradient(circle at 98% 10%, rgba(255, 222, 133, 0.42), transparent 28rem),
    radial-gradient(circle at 50% 102%, rgba(174, 222, 212, 0.34), transparent 34rem),
    var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(rgba(102, 72, 92, 0.12) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

body.modal-open {
  overflow: hidden;
}

h1, h2, h3, h4, p, dl, dd, dt, figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

img, svg {
  display: block;
}

::selection {
  background: rgba(232, 93, 117, 0.22);
}

:focus-visible {
  outline: 3px solid rgba(232, 93, 117, 0.45);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

.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;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   漂浮花瓣 / 装饰
   -------------------------------------------------------------------------- */

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

.floating-petal {
  position: absolute;
  top: -8vh;
  color: var(--rose);
  animation-name: petalFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}

@keyframes petalFall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(28px, 52vh, 0) rotate(180deg);
  }
  100% {
    transform: translate3d(-18px, 112vh, 0) rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   页头
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 14px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: min(1240px, calc(100% - 40px));
  margin: 14px auto 0;
  padding: 10px 12px 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.78);
  box-shadow: 0 8px 30px rgba(92, 53, 73, 0.08);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  transition: box-shadow 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 252, 246, 0.92);
  box-shadow: 0 14px 40px rgba(92, 53, 73, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 21px;
  background: linear-gradient(145deg, #ffe2e9, #ffd166);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 5px 14px rgba(232, 93, 117, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.2em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.main-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover {
  background: rgba(232, 93, 117, 0.1);
  color: var(--rose-deep);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.offline-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(63, 143, 104, 0.18);
  border-radius: 999px;
  background: rgba(232, 245, 238, 0.8);
  color: #2f7d5b;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34a853;
  box-shadow: 0 0 0 0 rgba(52, 168, 83, 0.55);
  animation: pulseDot 2.2s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(52, 168, 83, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(52, 168, 83, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 168, 83, 0); }
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fffaf4;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-cta:hover {
  background: var(--rose-deep);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   通用布局 / 标题
   -------------------------------------------------------------------------- */

main {
  position: relative;
  z-index: 1;
}

.hero,
.section,
.site-footer {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.section {
  padding: 82px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--rose-deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow .spark {
  color: var(--gold);
  font-size: 14px;
  animation: twinkle 3.5s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.55; transform: scale(0.9) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(18deg); }
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.section-heading p {
  max-width: 620px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14.5px;
}

.heading-badge {
  flex-shrink: 0;
  padding: 9px 14px;
  border: 1px solid rgba(232, 93, 117, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--rose-deep);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.heading-badge.mint {
  border-color: rgba(42, 157, 143, 0.22);
  color: #1f7d72;
  background: rgba(227, 247, 242, 0.62);
}

.reveal {
  opacity: 1;
  transform: none;
}

.reveal.is-visible {
  animation: revealIn 0.65s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes revealIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 48px;
  align-items: center;
  padding: 64px 0 44px;
  min-height: 640px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero h1 {
  max-width: 760px;
  margin-top: 18px;
  font-size: clamp(3.2rem, 6.5vw, 6.2rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero h1 em {
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
  font-style: normal;
  color: var(--rose-deep);
  background: linear-gradient(100deg, var(--rose-deep) 4%, var(--coral) 38%, var(--plum) 78%, var(--teal) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: gradientShift 9s ease-in-out infinite;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 em {
    color: transparent;
  }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 0;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(244, 185, 66, 0.5), transparent 70%);
  filter: blur(1px);
}

.hero-lead {
  max-width: 600px;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.85;
}

.hero-lead strong {
  color: var(--ink);
  background: linear-gradient(transparent 62%, rgba(244, 185, 66, 0.38) 62%);
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 610px;
  margin-top: 30px;
  padding: 8px 8px 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 40px rgba(92, 53, 73, 0.12);
  backdrop-filter: blur(14px);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.hero-search:focus-within {
  box-shadow: 0 20px 52px rgba(232, 93, 117, 0.18);
  transform: translateY(-2px);
}

.search-icon {
  color: var(--rose-deep);
  font-size: 24px;
  line-height: 1;
  transform: rotate(-15deg);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14.5px;
}

.hero-search input::placeholder {
  color: #a295a8;
}

.hero-search button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(232, 93, 117, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(232, 93, 117, 0.36);
}

.hero-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero-suggestions button {
  padding: 7px 11px;
  border: 1px solid rgba(73, 52, 84, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--ink-soft);
  font-size: 11.5px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero-suggestions button:hover {
  background: #fff;
  border-color: rgba(232, 93, 117, 0.28);
  transform: translateY(-1px);
}

.hero-stats {
  display: flex;
  gap: 34px;
  margin-top: 36px;
}

.hero-stats > div {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
}

.hero-stats > div + div::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 7px;
  bottom: 3px;
  width: 1px;
  background: var(--line);
}

.hero-stats dt {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.hero-stats dd {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.hero-stats strong {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.hero-stats dd span {
  color: var(--muted);
  font-size: 11px;
}

/* Hero 右侧艺术区 */

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 540px;
  isolation: isolate;
}

.art-halo {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  z-index: -1;
}

.halo-one {
  width: 430px;
  height: 430px;
  background: radial-gradient(circle at 38% 35%, rgba(255, 210, 221, 0.9), rgba(255, 224, 138, 0.26) 55%, transparent 70%);
  animation: haloBreathe 9s ease-in-out infinite;
}

.halo-two {
  width: 350px;
  height: 350px;
  right: -40px;
  bottom: 10px;
  border: 1px dashed rgba(123, 75, 148, 0.22);
  animation: slowSpin 42s linear infinite;
}

@keyframes haloBreathe {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes slowSpin {
  to { transform: rotate(360deg); }
}

.daily-card {
  --daily-a: #ff6b81;
  --daily-b: #ffd166;
  position: relative;
  width: min(390px, 86%);
  padding: 24px 26px 22px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 34px;
  background-color: #fdeef2;
  background:
    radial-gradient(circle at 84% 4%, rgba(255, 255, 255, 0.5), transparent 34%),
    linear-gradient(150deg, color-mix(in srgb, var(--daily-a) 26%, #fff7f0), color-mix(in srgb, var(--daily-b) 34%, #fffdf8));
  box-shadow: 0 30px 70px rgba(92, 53, 73, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  transform: rotate(-2.5deg);
  transition: transform 0.35s ease;
  overflow: hidden;
}

.daily-card::before {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  top: -70px;
  right: -40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.daily-card::after {
  content: "FLOWER OF THE DAY";
  position: absolute;
  right: -42px;
  bottom: 92px;
  color: rgba(73, 52, 84, 0.18);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.24em;
  transform: rotate(90deg);
}

.daily-card:hover {
  transform: rotate(0deg) translateY(-4px);
}

.daily-card.is-flipping {
  animation: cardFlip 0.5s ease;
}

@keyframes cardFlip {
  0% { transform: rotate(-2.5deg) scale(1); }
  45% { transform: rotate(1.5deg) scale(0.97); }
  100% { transform: rotate(-2.5deg) scale(1); }
}

.daily-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.daily-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.text-btn {
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.text-btn:hover {
  opacity: 1;
}

.daily-visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 178px;
  margin: 0 auto;
}

.daily-emoji {
  position: relative;
  z-index: 2;
  font-size: 104px;
  line-height: 1;
  filter: drop-shadow(0 16px 18px rgba(89, 50, 68, 0.18));
  animation: gentleFloat 5s ease-in-out infinite;
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-9px) rotate(2deg); }
}

.daily-orbit {
  position: absolute;
  color: rgba(255, 255, 255, 0.8);
  font-size: 25px;
  text-shadow: 0 2px 8px rgba(92, 53, 73, 0.1);
}

.orbit-a {
  top: 28px;
  left: 32px;
  animation: orbitFloat 4.5s ease-in-out infinite;
}

.orbit-b {
  right: 38px;
  bottom: 28px;
  font-size: 18px;
  animation: orbitFloat 6s ease-in-out infinite reverse;
}

@keyframes orbitFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(6px, -8px) rotate(16deg); }
}

.daily-sci {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-style: italic;
  letter-spacing: 0.02em;
  text-align: center;
}

.daily-card h2 {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-align: center;
}

.daily-meaning {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

.daily-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.daily-meta span {
  max-width: 100%;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.3;
}

.daily-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 18px;
  padding: 11px;
  border: 1px solid rgba(73, 52, 84, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s ease, gap 0.2s ease;
}

.daily-link:hover {
  gap: 13px;
  background: rgba(255, 255, 255, 0.82);
}

.float-note {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  animation: noteFloat 6s ease-in-out infinite;
}

.float-note span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.float-note strong {
  font-size: 11px;
}

.float-note small {
  color: var(--muted);
  font-size: 9px;
}

.note-icon {
  font-size: 18px;
}

.note-a {
  left: 18px;
  bottom: 0;
}

.note-b {
  right: 0;
  top: 0;
  animation-delay: -2.6s;
}

@keyframes noteFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.sticker {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0.05em;
}

.sticker-a {
  right: 18px;
  bottom: 34px;
  width: 76px;
  height: 76px;
  background: var(--ink);
  color: #fff6e8;
  transform: rotate(9deg);
  box-shadow: 0 12px 26px rgba(48, 39, 53, 0.24);
}

.sticker-b {
  left: 52px;
  top: 22px;
  color: var(--rose-deep);
  font-size: 26px;
  transform: rotate(-12deg);
}

/* --------------------------------------------------------------------------
   对话区
   -------------------------------------------------------------------------- */

.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 342px;
  gap: 22px;
  align-items: start;
}

.chat-card,
.side-card,
.prompt-card,
.pipeline-card,
.flower-card,
.quiz-card,
.kb-note {
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-md);
}

.chat-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.92);
}

.chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.assistant-id {
  display: flex;
  align-items: center;
  gap: 11px;
}

.assistant-id > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.assistant-id strong {
  font-size: 13.5px;
}

.assistant-id small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
}

.avatar-bot {
  background: linear-gradient(145deg, #ffe0e8, #ffe8a8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.avatar-user {
  background: var(--ink);
  color: #fff9f0;
  font-size: 12px;
}

.ghost-btn {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 700;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ghost-btn:hover {
  background: #fff;
  border-color: var(--line-strong);
}

.ghost-btn.is-favorite {
  border-color: rgba(232, 93, 117, 0.26);
  color: var(--rose-deep);
  background: rgba(255, 236, 240, 0.75);
}

.chat-log {
  height: 510px;
  overflow-y: auto;
  padding: 24px 22px 16px;
  background:
    radial-gradient(circle at 95% 0%, rgba(255, 231, 168, 0.16), transparent 14rem),
    radial-gradient(circle at 2% 100%, rgba(208, 236, 230, 0.2), transparent 16rem);
  scrollbar-width: thin;
  scrollbar-color: rgba(123, 75, 148, 0.25) transparent;
}

.chat-log::-webkit-scrollbar {
  width: 7px;
}

.chat-log::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(123, 75, 148, 0.22);
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  animation: messageIn 0.32s ease both;
}

@keyframes messageIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-user {
  flex-direction: row-reverse;
}

.message-body {
  max-width: min(86%, 640px);
}

.message-user .message-body {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 5px 5px;
  color: var(--muted);
  font-size: 9.5px;
}

.message-user .message-meta {
  flex-direction: row-reverse;
}

.message-meta strong {
  color: var(--ink-soft);
  font-size: 10.5px;
}

.bubble {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px 18px 18px 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 13.5px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.message-user .bubble {
  border: 0;
  border-radius: 18px 4px 18px 18px;
  background: linear-gradient(135deg, var(--rose), #d95f8a);
  color: #fff;
  box-shadow: 0 8px 20px rgba(232, 93, 117, 0.22);
}

.message-user .bubble p {
  margin: 0;
}

.is-typing .bubble {
  color: var(--muted);
}

.typing-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.typing-dots {
  display: inline-flex;
  gap: 3px;
}

.typing-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rose);
  animation: typingBounce 1.1s infinite;
}

.typing-dots i:nth-child(2) { animation-delay: 0.14s; }
.typing-dots i:nth-child(3) { animation-delay: 0.28s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* 对话内回答样式 */

.answer-lead {
  font-size: 14px;
  line-height: 1.75;
}

.answer-title {
  margin-bottom: 7px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.answer-paragraph {
  margin: 8px 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.answer-subtitle {
  margin: 16px 0 8px;
  font-size: 12.5px;
  font-weight: 800;
}

.answer-note {
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.answer-hero {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 16px;
  background-color: #fff8f2;
  background:
    radial-gradient(circle at 94% 8%, color-mix(in srgb, var(--accent-soft) 55%, #fff), transparent 45%),
    color-mix(in srgb, var(--accent-soft) 14%, #fffdf9);
}

.answer-hero-emoji {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.66);
  font-size: 31px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.answer-hero-copy {
  min-width: 0;
}

.answer-kicker {
  display: block;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 9.5px;
  font-style: italic;
  line-height: 1.3;
}

.answer-hero h3 {
  margin: 1px 0 3px;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.2;
}

.answer-hero p {
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.55;
}

.answer-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.answer-hero-tags > span {
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.4;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0;
}

.fact-grid > div {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
}

.fact-grid span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 8.5px;
}

.fact-grid strong {
  display: block;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
}

.check-list {
  margin: 8px 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin: 6px 0;
  padding-left: 17px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.6;
}

.check-list li::before {
  content: "✿";
  position: absolute;
  top: 1px;
  left: 0;
  color: var(--rose);
  font-size: 9px;
}

.safety-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  line-height: 1.55;
}

.safety-banner.is-danger {
  border-color: rgba(192, 57, 43, 0.16);
  background: var(--danger-soft);
}

.safety-banner.is-safe {
  border-color: rgba(47, 125, 91, 0.16);
  background: var(--safe-soft);
}

.safety-banner.is-emergency {
  border-color: rgba(192, 57, 43, 0.24);
  background: #fff3ef;
}

.safety-banner.compact {
  margin: 9px 0;
  padding: 9px 10px;
}

.safety-icon {
  font-size: 17px;
  line-height: 1.3;
}

.safety-banner strong {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
}

.safety-banner p {
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.55;
}

.tip-box {
  display: flex;
  gap: 8px;
  margin: 10px 0;
  padding: 10px 11px;
  border-left: 2px solid var(--gold);
  border-radius: 0 9px 9px 0;
  background: rgba(255, 242, 201, 0.32);
  font-size: 10.5px;
  line-height: 1.6;
}

.tip-box p {
  min-width: 0;
  color: var(--ink-soft);
}

.highlight-box {
  margin: 10px 0;
  padding: 11px 13px;
  border: 1px solid rgba(232, 93, 117, 0.14);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(255, 236, 240, 0.8), rgba(255, 250, 236, 0.76));
}

.highlight-label {
  display: block;
  margin-bottom: 3px;
  color: var(--rose-deep);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.highlight-box p {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.problem-list {
  display: grid;
  gap: 8px;
}

.problem-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
}

.problem-item.compact {
  margin-top: 9px;
}

.problem-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.problem-title span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(232, 93, 117, 0.1);
  color: var(--rose-deep);
  font-size: 8px;
  font-weight: 800;
}

.problem-title strong {
  font-size: 11.5px;
}

.problem-item p {
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.6;
}

.meaning-card {
  position: relative;
  margin: 12px 0;
  padding: 20px 18px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #332a3d, #51394f);
  color: #fff8ef;
  overflow: hidden;
}

.meaning-card::after {
  content: "❀";
  position: absolute;
  right: 12px;
  bottom: -18px;
  color: rgba(255, 255, 255, 0.08);
  font-size: 96px;
}

.meaning-quote {
  position: absolute;
  top: 5px;
  left: 8px;
  color: rgba(244, 185, 66, 0.55);
  font-family: Georgia, serif;
  font-size: 58px;
  line-height: 1;
}

.meaning-card p {
  position: relative;
  z-index: 1;
  padding-left: 18px;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.5;
}

.meaning-card small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  padding-left: 18px;
  color: rgba(255, 248, 239, 0.6);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.mini-gift-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.mini-gift-row span {
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(123, 75, 148, 0.07);
  color: var(--ink-soft);
  font-size: 9.5px;
}

.answer-sources {
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.sources-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink-soft);
  font-size: 9px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.source-chip:hover {
  border-color: rgba(232, 93, 117, 0.3);
  background: #fff;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.quick-chip {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.quick-chip:hover {
  background: #fff;
  transform: translateY(-1px);
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 11px 0;
}

.help-grid > div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
}

.help-grid span {
  display: block;
  margin-bottom: 2px;
  font-size: 15px;
}

.help-grid strong {
  font-size: 10.5px;
}

.help-grid p {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.compare-wrap {
  margin: 10px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.compare-table {
  width: 100%;
  min-width: 430px;
  border-collapse: collapse;
  font-size: 10px;
}

.compare-table th,
.compare-table td {
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  background: rgba(255, 242, 231, 0.72);
  font-size: 10.5px;
}

.compare-table tbody th {
  width: 66px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.compare-table tr:last-child th,
.compare-table tr:last-child td {
  border-bottom: 0;
}

.rec-grid {
  display: grid;
  gap: 7px;
  margin: 11px 0;
}

.rec-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background-color: #fffaf6;
  background:
    radial-gradient(circle at 96% 0%, color-mix(in srgb, var(--rec-b) 28%, transparent), transparent 42%),
    rgba(255, 255, 255, 0.74);
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rec-card:hover {
  transform: translateX(3px);
  border-color: color-mix(in srgb, var(--rec-a) 34%, transparent);
  background: #fff;
}

.rec-emoji {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 24px;
}

.rec-body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}

.rec-body strong {
  font-size: 12px;
}

.rec-warning {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(192, 57, 43, 0.08);
  color: #a93226;
  font-size: 8px;
  font-weight: 700;
  vertical-align: 1px;
}

.rec-body small {
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rec-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.rec-reasons em {
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(63, 143, 104, 0.08);
  color: #35735b;
  font-size: 8px;
  font-style: normal;
}

.rec-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
}

.rec-match {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(232, 93, 117, 0.08);
  color: var(--rose-deep);
  font-size: 7.5px;
  font-weight: 700;
  vertical-align: 1px;
}

.rec-arrow {
  flex-shrink: 0;
  color: var(--rose-deep);
  font-size: 15px;
  opacity: 0.5;
}

.active-filter {
  display: inline-block;
  margin-right: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(232, 93, 117, 0.1);
  color: var(--rose-deep);
  font-size: 9.5px;
  font-weight: 600;
}

.pet-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.pet-badge.safe {
  background: rgba(232, 245, 238, 0.9);
  color: #2f7d5b;
}

.pet-badge.danger {
  background: rgba(253, 236, 234, 0.92);
  color: #a93226;
}

/* 输入区 */

.suggestion-wrap {
  padding: 10px 18px 0;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.suggestion-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.suggestion-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 9px;
  scrollbar-width: none;
}

.suggestion-row::-webkit-scrollbar {
  display: none;
}

.suggestion-row button {
  flex-shrink: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  font-size: 10px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.suggestion-row button:hover {
  border-color: rgba(232, 93, 117, 0.28);
  background: #fff;
}

.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 12px 18px 6px;
  background: rgba(255, 255, 255, 0.7);
}

.chat-form textarea {
  flex: 1;
  min-height: 44px;
  max-height: 132px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: #fff;
  resize: none;
  font-size: 13px;
  line-height: 1.55;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-form textarea:focus {
  border-color: rgba(232, 93, 117, 0.38);
  box-shadow: 0 0 0 3px rgba(232, 93, 117, 0.08);
}

.chat-form textarea::placeholder {
  color: #a89aab;
}

.send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 17px;
  border: 0;
  border-radius: 13px;
  background: var(--ink);
  color: #fff8ef;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.send-btn:hover {
  background: var(--rose-deep);
  transform: translateY(-1px);
}

.send-btn:disabled {
  opacity: 0.55;
  transform: none;
}

.input-hint {
  padding: 0 20px 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 8.5px;
}

kbd {
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.8);
  font-family: var(--font-mono);
  font-size: 8px;
}

/* 右侧栏 */

.rag-side {
  display: grid;
  gap: 16px;
}

.side-card {
  padding: 19px;
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.9);
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.side-head h3 {
  font-size: 12.5px;
  font-weight: 800;
}

.mini-tag {
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(123, 75, 148, 0.08);
  color: var(--plum);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.persona-card {
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 225, 170, 0.35), transparent 45%),
    rgba(255, 253, 248, 0.92);
}

.persona-quote {
  padding: 11px 12px;
  border-left: 2px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1.65;
}

.persona-list {
  margin: 13px 0;
  padding: 0;
  list-style: none;
}

.persona-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  color: var(--ink-soft);
  font-size: 10.5px;
}

.persona-list span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(232, 93, 117, 0.08);
  color: var(--rose-deep);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
}

.text-link {
  color: var(--rose-deep);
  font-size: 10px;
  font-weight: 700;
}

.text-link:hover {
  text-decoration: underline;
}

.retrieval-time {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.retrieval-summary {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.retrieval-summary strong {
  color: var(--rose-deep);
}

.retrieval-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.retrieval-entry {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.6);
  animation: messageIn 0.3s ease both;
}

.retrieval-item {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.retrieval-rank {
  color: rgba(123, 75, 148, 0.5);
  font-family: var(--font-mono);
  font-size: 7.5px;
}

.retrieval-main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}

.retrieval-main strong {
  overflow: hidden;
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retrieval-main small {
  color: var(--muted);
  font-size: 7.5px;
}

.retrieval-score {
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(63, 143, 104, 0.08);
  color: #35735b;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 700;
}

.retrieval-snippet {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 7.8px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.empty-retrieval {
  display: grid;
  place-items: center;
  min-height: 120px;
  margin-top: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: #b0a4b5;
  text-align: center;
}

.empty-retrieval > span {
  font-size: 24px;
  line-height: 1;
}

.empty-retrieval p {
  margin-top: 6px;
  font-size: 8.5px;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   图鉴
   -------------------------------------------------------------------------- */

.catalog-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 260px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.catalog-search:focus-within {
  border-color: rgba(232, 93, 117, 0.35);
  box-shadow: 0 0 0 3px rgba(232, 93, 117, 0.07);
}

.catalog-search span {
  color: var(--rose-deep);
  font-size: 17px;
  transform: rotate(-12deg);
}

.catalog-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11.5px;
}

.fav-filter {
  flex-shrink: 0;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 700;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.fav-filter:hover,
.fav-filter.is-active {
  border-color: rgba(232, 93, 117, 0.28);
  background: rgba(255, 236, 240, 0.8);
  color: var(--rose-deep);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.filter-chip span {
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: rgba(73, 52, 84, 0.06);
  color: var(--muted);
  font-size: 7.5px;
}

.filter-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(232, 93, 117, 0.24);
  background: #fff;
}

.filter-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff8ef;
}

.filter-chip.is-active span {
  background: rgba(255, 255, 255, 0.16);
  color: #fff8ef;
}

.catalog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

#catalog-count {
  color: var(--muted);
  font-size: 10.5px;
}

.catalog-hint {
  color: #a99cab;
  font-size: 9px;
}

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

.flower-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.92);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.28s ease;
}

.flower-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 50px rgba(92, 53, 73, 0.16);
}

.flower-card:focus-within {
  outline: 3px solid rgba(232, 93, 117, 0.35);
  outline-offset: 3px;
}

.card-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}

.fav-btn {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.fav-btn:hover {
  transform: scale(1.1);
  background: #fff;
}

.fav-btn.is-favorite {
  color: var(--rose-deep);
  background: #fff0f3;
}

.flower-visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 142px;
  background-color: #fbe8e1;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.65), transparent 38%),
    linear-gradient(140deg, color-mix(in srgb, var(--card-a) 24%, #fff8f0), color-mix(in srgb, var(--card-b) 42%, #fffdf8));
  overflow: hidden;
}

.flower-visual::before,
.flower-visual::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
}

.flower-visual::before {
  width: 120px;
  height: 120px;
  top: -48px;
  right: -24px;
}

.flower-visual::after {
  width: 74px;
  height: 74px;
  bottom: -34px;
  left: 12px;
}

.flower-big-emoji {
  position: relative;
  z-index: 1;
  font-size: 62px;
  line-height: 1;
  filter: drop-shadow(0 10px 14px rgba(89, 50, 68, 0.18));
  transition: transform 0.3s ease;
}

.flower-card:hover .flower-big-emoji {
  transform: scale(1.06) rotate(-3deg);
}

.difficulty {
  position: absolute;
  top: 11px;
  left: 11px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 8px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.difficulty.easy {
  background: rgba(232, 245, 238, 0.9);
  color: #2f7d5b;
}

.difficulty.medium {
  background: rgba(255, 243, 207, 0.9);
  color: #96711b;
}

.difficulty.hard {
  background: rgba(253, 236, 234, 0.9);
  color: #a93226;
}

.flower-visual .pet-badge {
  position: absolute;
  right: 11px;
  bottom: 10px;
}

.flower-card-body {
  padding: 14px 15px 11px;
}

.flower-latin {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 9px;
  font-style: italic;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flower-card-body h3 {
  margin-top: 1px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.flower-desc {
  display: -webkit-box;
  min-height: 34px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 9px;
}

.color-row > span:last-child {
  margin-left: 3px;
  color: var(--muted);
  font-size: 8px;
}

.color-dot {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(73, 52, 84, 0.1);
  border-radius: 50%;
}

.color-dot.is-light {
  border-color: rgba(73, 52, 84, 0.25);
  box-shadow: inset 0 0 0 1px #fff;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
}

.tag-row span {
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(73, 52, 84, 0.045);
  color: var(--ink-soft);
  font-size: 8px;
}

.flower-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 15px 11px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 8px;
}

.flower-card-foot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  padding: 56px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.42);
  text-align: center;
}

.empty-emoji {
  display: block;
  font-size: 52px;
  line-height: 1;
}

.empty-state h3 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 24px;
}

.empty-state p {
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 17px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(232, 93, 117, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(232, 93, 117, 0.3);
}

/* --------------------------------------------------------------------------
   花语小测
   -------------------------------------------------------------------------- */

.quiz-section {
  padding-top: 24px;
}

.quiz-card {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(0, 1.24fr);
  gap: 34px;
  align-items: center;
  padding: 46px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 212, 110, 0.2), transparent 24rem),
    radial-gradient(circle at 96% 100%, rgba(232, 93, 117, 0.22), transparent 26rem),
    linear-gradient(135deg, #2d2536 0%, #473044 52%, #5d3d50 100%);
  color: #fff8ef;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.eyebrow.light {
  color: #f6cf8a;
}

.quiz-copy h2 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.quiz-copy p {
  max-width: 330px;
  margin-top: 12px;
  color: rgba(255, 248, 239, 0.64);
  font-size: 12.5px;
  line-height: 1.75;
}

.quiz-scoreboard {
  display: flex;
  gap: 26px;
  margin-top: 28px;
}

.quiz-scoreboard > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quiz-scoreboard strong {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  color: #ffd479;
}

.quiz-scoreboard span {
  color: rgba(255, 248, 239, 0.56);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.quiz-panel {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(12px);
}

.quiz-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quiz-badge {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f6cf8a;
  color: #3a2c35;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.quiz-tip {
  color: rgba(255, 248, 239, 0.46);
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

.quiz-question {
  min-height: 70px;
  margin: 17px 0 15px;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.55;
}

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

.quiz-option {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff8ef;
  font-size: 11.5px;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.quiz-option span {
  font-size: 16px;
}

.quiz-option:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(255, 212, 121, 0.48);
  background: rgba(255, 255, 255, 0.12);
}

.quiz-option.is-correct {
  border-color: rgba(116, 211, 151, 0.7);
  background: rgba(63, 143, 104, 0.32);
}

.quiz-option.is-wrong {
  border-color: rgba(255, 138, 128, 0.65);
  background: rgba(192, 57, 43, 0.24);
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-feedback {
  min-height: 34px;
  margin-top: 10px;
  color: rgba(255, 248, 239, 0.7);
  font-size: 10.5px;
  line-height: 1.55;
}

.quiz-feedback.is-correct {
  color: #9fe3b8;
}

.quiz-feedback.is-wrong {
  color: #ffb4a8;
}

.quiz-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 9px 14px;
  border: 0;
  border-radius: 8px;
  background: #f6cf8a;
  color: #3a2c35;
  font-size: 10.5px;
  font-weight: 800;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.quiz-next:hover:not(:disabled) {
  transform: translateY(-1px);
}

.quiz-next:disabled {
  opacity: 0.35;
}

.petal-burst {
  position: fixed;
  z-index: 300;
  pointer-events: none;
  animation: petalBurst 1.4s cubic-bezier(0.16, 0.8, 0.3, 1) forwards;
}

@keyframes petalBurst {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.4);
  }
}

/* --------------------------------------------------------------------------
   RAG 说明
   -------------------------------------------------------------------------- */

.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: 18px;
  align-items: stretch;
}

.prompt-card,
.pipeline-card {
  padding: 28px;
  border-radius: var(--radius-lg);
}

.prompt-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(244, 185, 66, 0.11), transparent 40%),
    linear-gradient(145deg, #2c2535, #3c2b40);
  color: #fff8ef;
}

.card-kicker {
  color: #e7a6b3;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.prompt-card h3,
.pipeline-card h3 {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1.3;
}

.prompt-card pre {
  max-height: 350px;
  margin: 16px 0;
  padding: 15px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 248, 239, 0.8);
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-width: thin;
}

.prompt-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 248, 239, 0.46);
  font-size: 8.5px;
}

.code-dot {
  color: #78c99c;
  font-size: 6px;
}

.pipeline-card {
  background: rgba(255, 253, 248, 0.92);
}

.pipeline-card .card-kicker {
  color: var(--rose-deep);
}

.pipeline-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.pipeline-list li {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}

.pipeline-list li:last-child {
  border-bottom: 0;
}

.step-no {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(232, 93, 117, 0.12), rgba(244, 185, 66, 0.17));
  color: var(--rose-deep);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
}

.pipeline-list strong {
  display: block;
  font-size: 11.5px;
}

.pipeline-list p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.pipeline-note {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 11px;
  border-radius: 9px;
  background: rgba(255, 242, 201, 0.38);
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.6;
}

.kb-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-top: 18px;
  padding: 22px;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 98% 0%, rgba(174, 222, 212, 0.3), transparent 26rem),
    rgba(255, 253, 248, 0.88);
}

.kb-note-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 20px;
}

.kb-note h3 {
  font-size: 13px;
}

.kb-note p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.7;
}

.kb-note .kb-disclaimer {
  color: var(--muted);
  font-size: 9px;
}

.kb-tags {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kb-tags span {
  padding: 4px 7px;
  border-radius: 4px;
  background: rgba(73, 52, 84, 0.045);
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 30px;
  padding: 30px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}

.footer-brand > span {
  font-size: 22px;
}

.footer-brand div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.footer-brand strong {
  font-size: 12px;
}

.footer-brand small {
  color: var(--muted);
  font-size: 8px;
}

.site-footer > a {
  color: var(--rose-deep);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   弹窗
   -------------------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(48, 39, 53, 0.48);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  scrollbar-width: thin;
}

.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.modal-close:hover {
  transform: rotate(90deg);
  background: #fff;
}

.modal-hero {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 36px 38px 28px;
  background-color: #fbe8e1;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 255, 255, 0.55), transparent 37%),
    linear-gradient(140deg, color-mix(in srgb, var(--modal-a) 26%, #fff8f0), color-mix(in srgb, var(--modal-b) 38%, #fffdf8));
}

.modal-emoji {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 98px;
  height: 98px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 56px;
  box-shadow: 0 14px 30px rgba(89, 50, 68, 0.12);
}

.modal-hero-copy {
  min-width: 0;
}

.modal-kicker {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 10px;
  font-style: italic;
}

.modal-hero h2 {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.modal-hero p {
  max-width: 560px;
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.modal-tags > span:not(.pet-badge) {
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft);
  font-size: 8.5px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 38px 0;
}

.modal-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 18px 38px 0;
}

.modal-section {
  padding: 0 38px;
  margin-top: 18px;
}

.modal-sections .modal-section {
  padding: 0;
  margin-top: 0;
}

.modal-section h3 {
  margin-bottom: 8px;
  font-size: 12px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.detail-list > div {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.82);
}

.detail-list dt {
  color: var(--muted);
  font-size: 8px;
}

.detail-list dd {
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.5;
}

.modal-section .check-list {
  margin: 0;
  padding: 12px 16px 12px 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
}

.modal-section .check-list li {
  font-size: 10.5px;
}

.modal .safety-banner {
  margin: 18px 38px 0;
}

.modal-problems details {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.modal-problems details + details {
  margin-top: 6px;
}

.modal-problems summary {
  padding: 9px 12px;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 700;
  list-style: none;
}

.modal-problems summary::-webkit-details-marker {
  display: none;
}

.modal-problems summary::before {
  content: "＋";
  display: inline-block;
  margin-right: 7px;
  color: var(--rose-deep);
  font-weight: 700;
}

.modal-problems details[open] summary::before {
  content: "－";
}

.modal-problems details p {
  padding: 0 12px 10px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.65;
}

.culture-section {
  padding-bottom: 0;
}

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

.culture-grid > div {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.7);
}

.culture-grid span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.culture-grid strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.5;
}

.fun-fact {
  margin-top: 8px;
  padding: 10px 12px;
  border-left: 2px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 242, 201, 0.32);
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.65;
}

.modal-foot {
  margin: 18px 38px 0;
  padding: 12px 0 24px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 8px;
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 200;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(48, 39, 53, 0.92);
  color: #fff8ef;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(8px);
}

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

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.78fr);
    gap: 30px;
  }

  .hero-art {
    min-height: 480px;
  }

  .daily-card {
    width: min(350px, 92%);
  }

  .float-note.note-a {
    left: -4px;
  }

  .note-b {
    right: -4px;
  }

  .chat-layout {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

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

  .prompt-card pre {
    max-height: 300px;
  }
}

@media (max-width: 900px) {
  .main-nav {
    display: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 54px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-art {
    min-height: 510px;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
  }

  .daily-card {
    width: min(370px, 86%);
  }

  .float-note {
    display: none;
  }

  .note-a {
    left: 3%;
  }

  .note-b {
    right: 2%;
  }

  .section {
    padding: 66px 0;
  }

  .quiz-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .quiz-copy p {
    max-width: 520px;
  }

  .quiz-scoreboard {
    margin-top: 18px;
  }

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

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .catalog-tools {
    width: 100%;
  }

  .catalog-search {
    flex: 1;
    width: auto;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 92px;
  }

  .site-header {
    top: 8px;
    width: calc(100% - 24px);
    margin-top: 8px;
    padding: 8px 9px 8px 12px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .brand-text strong {
    font-size: 14px;
  }

  .brand-text small {
    font-size: 7px;
  }

  .offline-pill {
    display: none;
  }

  .header-cta {
    padding: 8px 12px;
    font-size: 11px;
  }

  .hero,
  .section,
  .site-footer {
    width: calc(100% - 32px);
  }

  .hero {
    padding: 46px 0 30px;
    min-height: 0;
  }

  .hero h1 {
    margin-top: 14px;
    font-size: clamp(2.8rem, 13.4vw, 4.2rem);
    letter-spacing: -0.045em;
  }

  .hero-lead {
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.75;
  }

  .hero-search {
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    border-radius: 15px;
  }

  .hero-search .search-icon {
    margin-left: 6px;
  }

  .hero-search input {
    width: calc(100% - 42px);
    flex: none;
    padding: 8px 0;
    font-size: 13px;
  }

  .hero-search button {
    width: 100%;
    justify-content: center;
    padding: 10px;
  }

  .hero-suggestions {
    gap: 5px;
  }

  .hero-suggestions button {
    font-size: 10px;
    padding: 6px 9px;
  }

  .hero-stats {
    gap: 22px;
    margin-top: 26px;
  }

  .hero-stats > div + div::before {
    left: -12px;
  }

  .hero-stats strong {
    font-size: 23px;
  }

  .hero-art {
    min-height: 450px;
  }

  .art-halo {
    display: none;
  }

  .daily-card {
    width: min(330px, 90%);
    padding: 20px 21px 18px;
  }

  .daily-visual {
    height: 150px;
  }

  .daily-emoji {
    font-size: 88px;
  }

  .daily-card h2 {
    font-size: 31px;
  }

  .float-note {
    padding: 8px 10px;
  }

  .float-note small {
    font-size: 8px;
  }

  .note-a {
    left: 0;
    bottom: 60px;
  }

  .note-b {
    top: 34px;
    right: 0;
  }

  .sticker-a {
    width: 60px;
    height: 60px;
    font-size: 7px;
    right: 0;
    bottom: 16px;
  }

  .sticker-b {
    left: 20px;
    top: 10px;
  }

  .section {
    padding: 52px 0;
  }

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

  .section-heading h2 {
    font-size: 1.9rem;
  }

  .section-heading p {
    font-size: 12.5px;
  }

  .heading-badge {
    font-size: 10px;
  }

  .chat-card {
    border-radius: 22px;
  }

  .chat-topbar {
    padding: 12px 14px;
  }

  .chat-log {
    height: 430px;
    padding: 16px 13px 10px;
  }

  .message {
    gap: 7px;
  }

  .avatar {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .avatar-user {
    font-size: 10px;
  }

  .message-body {
    max-width: calc(100% - 38px);
  }

  .bubble {
    padding: 11px 13px;
    font-size: 12.5px;
  }

  .answer-hero {
    padding: 11px;
  }

  .answer-hero-emoji {
    width: 46px;
    height: 46px;
    font-size: 25px;
  }

  .answer-hero h3 {
    font-size: 18px;
  }

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

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

  .suggestion-wrap {
    padding: 9px 13px 0;
  }

  .chat-form {
    padding: 10px 13px 5px;
  }

  .send-btn {
    width: 44px;
    padding: 0;
  }

  .send-btn span {
    display: none;
  }

  .input-hint {
    padding: 0 14px 11px;
  }

  .rag-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-tools {
    flex-wrap: wrap;
  }

  .catalog-search {
    flex-basis: 100%;
  }

  .fav-filter {
    width: 100%;
  }

  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    flex-shrink: 0;
  }

  .catalog-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .flower-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .flower-visual {
    height: 132px;
  }

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

  .quiz-copy h2 {
    font-size: 2.2rem;
  }

  .quiz-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .quiz-question {
    min-height: 62px;
    font-size: 18px;
  }

  .quiz-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .quiz-scoreboard {
    gap: 22px;
  }

  .how-grid {
    gap: 12px;
  }

  .prompt-card,
  .pipeline-card {
    padding: 20px;
    border-radius: 22px;
  }

  .prompt-card pre {
    max-height: 280px;
    font-size: 8.8px;
  }

  .kb-note {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .kb-tags {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 24px;
  }

  .modal {
    padding: 0;
    align-items: end;
  }

  .modal-panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
  }

  .modal-hero {
    padding: 26px 20px 20px;
    gap: 14px;
  }

  .modal-emoji {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    font-size: 40px;
  }

  .modal-hero h2 {
    font-size: 2rem;
  }

  .modal-actions {
    padding: 14px 20px 0;
  }

  .modal-sections {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 20px 0;
  }

  .modal-section {
    padding: 0 20px;
  }

  .modal-sections .modal-section {
    padding: 0;
  }

  .modal .safety-banner {
    margin: 14px 20px 0;
  }

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

  .modal-foot {
    margin: 14px 20px 0;
    padding-bottom: 18px;
  }

  .toast {
    bottom: 14px;
    max-width: calc(100% - 28px);
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .floating-petal {
    display: none;
  }
}
