html { scroll-padding-top: 84px; }
/* ============================================================
   TEMPLATE 05 — Bloom
   明快消费风:白底、紫罗兰+珊瑚、大圆角卡片、胶囊徽章。
   适用:生活方式 / 购物 / 家居 / 健康 等消费 niche。
   字体:Plus Jakarta Sans(标题)+ Inter(正文),Google Fonts。
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f5ff;
  --ink: #17131f;
  --muted: #5b5566;
  --faint: #746e80;
  --violet: #6d28d9;
  --violet-soft: #f0eaff;
  --coral: #f43f5e;
  --coral-soft: #fff1f2;
  --mint: #0d9488;
  --mint-soft: #f0fdfa;
  --line: #ece8f4;
  --line-strong: #d8d1e8;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(109, 40, 217, 0.08);
  --font-head: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--bg); color: var(--ink); line-height: 1.65; font-size: 16.5px; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis-weight: none; }
a { color: var(--violet); }
.topbar a, .footer a { text-decoration: none; }
a:hover { color: #4c1d95; }
h1, h2, h3 {
  text-wrap: balance; font-family: var(--font-head); line-height: 1.22; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
h2 { font-size: 1.6rem; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------- 顶栏:白色圆角悬浮 ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; }
.brand { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.brand .petal { color: var(--coral); }
.topnav { display: flex; gap: 8px; font-size: 0.9rem; font-weight: 600; }
.topnav a { color: var(--muted); padding: 7px 14px; border-radius: 999px; }
.topnav a:hover { background: var(--violet-soft); color: var(--violet); }
@media (max-width: 720px) { .topnav { display: none; } }

/* ---------- Hero:渐变柔光 + 大标题 ---------- */
.hero {
  padding: 60px 0 44px;
  background: linear-gradient(160deg, #f6f2ff 0%, #fff5f6 55%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: "";
  position: absolute; border-radius: 50%;
  filter: blur(60px); pointer-events: none;
}
.hero::before { width: 320px; height: 320px; background: rgba(109,40,217,0.10); top: -120px; right: -80px; }
.hero::after { width: 260px; height: 260px; background: rgba(244,63,94,0.08); bottom: -120px; left: -60px; }
.hero .container { position: relative; z-index: 1; }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; color: var(--violet); background: var(--violet-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { margin-bottom: 14px; }
.hero h1 .highlight { background: linear-gradient(transparent 62%, #fde68a 62%); }
.hero .lede { color: var(--muted); max-width: 60ch; font-size: 1.1rem; }
.hero-meta { margin-top: 18px; font-size: 0.88rem; color: var(--faint); display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- 排名卡片:大圆角 ---------- */
.rank-cards { padding: 40px 0; display: grid; gap: 18px; }
.rcard {
  display: grid; grid-template-columns: 76px 1fr 190px; gap: 22px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; padding: 22px 26px; box-shadow: var(--shadow);
}
.rcard { transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
.rcard:hover { border-color: var(--line-strong); box-shadow: 0 14px 40px -14px rgba(109, 40, 217, 0.22); transform: translateY(-3px); }
.rcard:hover .r-medal { transform: rotate(-6deg) scale(1.06); }
.r-medal { transition: transform 0.25s ease; }
@media (max-width: 860px) { .rcard { grid-template-columns: 60px 1fr; } .rcard .r-score { grid-column: 2; flex-direction: row; } }
.r-medal {
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; color: #fff;
  background: var(--violet);
}
.rcard:nth-child(2) .r-medal { background: var(--coral); }
.rcard:nth-child(3) .r-medal { background: var(--mint); }
.r-body h3 { font-size: 1.3rem; margin-bottom: 6px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pill { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
.pick { background: var(--coral-soft); color: var(--coral); }
.value { background: var(--mint-soft); color: var(--mint); }
.r-body p { color: var(--muted); font-size: 0.96rem; }
.r-why { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.r-why li { font-size: 0.8rem; font-weight: 600; color: var(--violet); background: var(--violet-soft); border-radius: 999px; padding: 4px 12px; }
.r-score { text-align: center; }
.r-score .big {
  font-family: var(--font-head); font-weight: 800; font-size: 1.7rem; color: var(--violet);
  width: 84px; height: 84px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--violet) calc(var(--pct, 93) * 1%), #ece8f4 0);
  position: relative;
}
.r-score .big::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.r-score .big span { position: relative; }
.r-score .lbl { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.r-score a { display: inline-block; margin-top: 8px; font-size: 0.84rem; font-weight: 700; }

/* ---------- 表格 ---------- */
.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.92rem; margin: 24px 0; }
.compare-table th, .compare-table td { border-bottom: 1px solid var(--line); padding: 12px 16px; text-align: left; }
.compare-table th { font-family: var(--font-head); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--violet); background: var(--bg-soft); }
.compare-table tr td:first-child { font-weight: 600; }
.compare-table tr:nth-child(even) td { background: #fcfbff; }

/* ---------- 正文 ---------- */
.prose { padding: 48px 0 64px; }
.prose h2 { margin: 36px 0 14px; }
.prose p { margin-bottom: 16px; color: #2b2437; }
.tip-box { background: var(--bg-soft); border-radius: var(--radius); padding: 20px 24px; margin: 26px 0; }
.tip-box .t-label { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral); margin-bottom: 8px; }

/* ---------- 页脚 ---------- */
.footer { background: #17131f; color: #b3abc4; margin-top: 48px; font-size: 0.88rem; border-radius: 24px 24px 0 0; }
.footer-inner { padding: 36px 0; display: grid; gap: 14px; }
.footer a { color: #ddd4f0; }
.related-note { border-top: 1px solid #2c2438; padding-top: 14px; font-size: 0.8rem; color: #746e80; }

/* ---- R7 micro-interactions ---- */
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
::selection { background: rgba(109, 40, 217, 0.14); }
a { text-underline-offset: 3px; }

/* ---- R8 tables ---- */
.compare-table { font-variant-numeric: tabular-nums; }
.compare-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) { .compare-table { min-width: 520px; } }

/* ---- R9 badges ---- */
[class*="badge"], [class*="pill"], [class*="tag"], .chip {
  white-space: nowrap; flex-shrink: 0;
}

/* ---- R10 nav ---- */
@media (max-width: 720px) {
  .topbar-inner, .masthead-top { flex-wrap: wrap; }
}
.topnav a[aria-current="page"] { font-weight: 700; }

/* ---- R11 footer ---- */
.related-note { line-height: 1.6; max-width: 88ch; }
.back-top { position: fixed; right: 18px; bottom: 18px; z-index: 30;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(109,40,217,0.9); color: #fff;
  font-size: 1.05rem; text-decoration: none;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25); }
.back-top:hover { opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) { .back-top { transition: none; } }

/* ---- R15 responsive ---- */
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  html { scroll-padding-top: 72px; }
}

/* ---- R16 a11y ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: #fff; color: #111; padding: 10px 18px; border-radius: 8px;
  font-weight: 700; box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.skip-link:focus { left: 8px; }

/* ---- Motion layer (R1) : transform/opacity only ---- */
[data-animate] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: inherit;
  will-change: opacity, transform;
}
[data-animate].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-animate] { opacity: 1; transform: none; transition: none; }
}

/* R3: score ring sweeps in (@property 让 conic 可过渡,不支持则静态显示) */
@property --pct { syntax: "<number>"; inherits: false; initial-value: 0; }
.rcard .big { transition: --pct 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s; }
.rcard:not(.in) .big { --pct: 0 !important; }

/* R5: arrow nudge on hover */
.col-link a::after, .score-cta::after, .rank-more a::after { display: inline-block; transition: transform 0.2s ease; }
.col-link a:hover::after, .score-cta:hover::after, .rank-more a:hover::after { transform: translateX(4px); }
a[class*="cta"]::after, .r-score a::after { content: none; }
.r-score a::after { content: " →"; display: inline-block; transition: transform 0.2s ease; }
.r-score a:hover::after { transform: translateX(4px); }

/* R6: scrolled header shadow */
.topbar.scrolled, .masthead.scrolled { box-shadow: 0 6px 24px -10px rgba(10, 15, 30, 0.28); transition: box-shadow 0.25s ease; }
.topbar, .masthead { transition: box-shadow 0.25s ease; }

/* R7 brand signature */
.brand .petal { display: inline-block; transform-origin: 80% 90%; transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.brand:hover .petal { transform: rotate(-10deg) scale(1.1); }

/* R1 typography features */
body { font-feature-settings: "kern" 1, "liga" 1, "calt" 1; -webkit-tap-highlight-color: transparent; }

/* R2 editorial measure */
.prose p { text-wrap: pretty; orphans: 3; widows: 3; }
.prose { hyphens: auto; }

/* R4 hero load sequence */
.hero .kicker, .hero h1, .hero .lede, .hero-meta { animation: heroRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.hero .kicker, .hero h1, .hero .lede, .hero-meta { animation-delay: 0.15s; }
@media (prefers-reduced-motion: reduce) { .hero .kicker, .hero h1, .hero .lede, .hero-meta { animation: none; } }

/* R5 hover inner response */
.rcard:hover .r-medal { transform: rotate(-6deg) scale(1.06); }

/* R6 prose link underline grow */
.prose p a {
  background: linear-gradient(currentColor, currentColor) bottom left / 0% 1px no-repeat;
  transition: background-size 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: 2px;
}
.prose p a:hover { background-size: 100% 1px; }

/* R7 themed scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #6d28d955; border-radius: 5px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #6d28d9; border: 2px solid transparent; background-clip: content-box; }

/* R8 touch feedback */
.rcard:active { transform: scale(0.995); }

/* R9 back-top smooth elevator */
.back-top { transform: translateY(10px); transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.back-top[style*="opacity: 1"], .back-top:hover { transform: translateY(0); }
.back-top:active { transform: translateY(2px); }

/* R4b keyframes */
@keyframes heroRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* R3 footer two-column */
@media (min-width: 860px) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: start; }
  .footer-inner > div:first-child { order: 1; }
  .related-note { order: 2; max-width: 56ch; border-top: 0; padding-top: 0; text-align: right; }
}

/* R4 current page nav state */
.topnav a[aria-current='page'] { background: var(--violet-soft); color: var(--violet); }
