/* FateMake v5 — 晨曦琥珀 · 青蓝 + 暖金（明亮東方感） */
:root {
  --fm-bg: #0e5f73;
  --fm-bg-soft: #147d8f;
  --fm-surface: #ffffff;
  --fm-surface-muted: #f0f9ff;
  --fm-surface-warm: #fffbeb;
  --fm-gold: #f59e0b;
  --fm-gold-light: #fde047;
  --fm-coral: #fb923c;
  --fm-teal: #14b8a6;
  --fm-teal-dark: #0d9488;
  --fm-indigo: #0ea5e9;
  --fm-indigo-dark: #0284c7;
  --fm-text: #134e4a;
  --fm-text-muted: #5b7c8a;
  --fm-border: rgba(245, 158, 11, 0.28);
  --fm-gradient: linear-gradient(125deg, #0891b2 0%, #2563eb 42%, #9333ea 88%);
  --fm-gradient-header: linear-gradient(95deg, #0e7490 0%, #1d4ed8 55%, #6d28d9 100%);
  --fm-gradient-gold: linear-gradient(135deg, #fbbf24 0%, #fde047 42%, #f59e0b 100%);
  --fm-gradient-page: linear-gradient(180deg, #fffbeb 0%, #f0f9ff 52%, #fef9c3 100%);
  --fm-radius: 18px;
  --fm-radius-sm: 12px;
  --fm-shadow: 0 20px 50px rgba(8, 145, 178, 0.12);
  --fm-shadow-soft: 0 8px 28px rgba(8, 145, 178, 0.07);
  --fm-header-bar-h: 56px;
  --fm-subnav-h: 44px;
  --fm-header-h: calc(var(--fm-header-bar-h) + var(--fm-subnav-h));
  --font-display: 'Cormorant Garamond', 'Noto Serif TC', serif;
  --font-body: 'DM Sans', 'Noto Sans TC', system-ui, sans-serif;
  --fm-wood: #22c55e;
  --fm-fire: #f87171;
  --fm-earth: #eab308;
  --fm-metal: #94a3b8;
  --fm-water: #38bdf8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  line-height: 1.75;
  color: var(--fm-text);
  background:
    radial-gradient(ellipse 90% 55% at 95% 0%, rgba(251, 191, 36, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 45% at 5% 15%, rgba(56, 189, 248, 0.14), transparent 50%),
    var(--fm-gradient-page);
  min-height: 100vh;
}

body.has-fixed-header { padding-top: var(--fm-header-h); }

.container { max-width: 1240px; margin: 0 auto; padding: 0 1.5rem; }
.container--wide { max-width: 1320px; }

/* Header */
.fm-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--fm-gradient-header);
  backdrop-filter: blur(12px) saturate(1.25);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 28px rgba(8, 145, 178, 0.25);
}

.fm-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--fm-header-bar-h);
}

.fm-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--fm-header-bar-h);
}

.fm-logo {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--fm-gold-light);
  text-decoration: none;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.fm-logo span { color: #fff; font-weight: 400; }

.fm-nav-primary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.fm-nav-link {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.fm-nav-link:hover { background: rgba(255,255,255,0.1); color: var(--fm-gold-light); }

/* Sub navigation — single compact row */
.fm-subnav {
  background: #fff;
  border-bottom: 1px solid rgba(14, 165, 233, 0.1);
  box-shadow: 0 2px 12px rgba(8, 145, 178, 0.06);
}
.fm-subnav-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: var(--fm-subnav-h);
}
.fm-subnav-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 52%;
  padding: 0.35rem 0;
}
.fm-subnav-section--guides {
  flex: 1 1 48%;
}
.fm-subnav-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg, transparent, rgba(14,165,233,0.2) 20%, rgba(14,165,233,0.2) 80%, transparent);
  margin: 0 0.65rem;
  flex-shrink: 0;
}
.fm-subnav-tag {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #0369a1;
  background: #e0f2fe;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  line-height: 1.2;
}
.fm-subnav-tag--guide {
  color: #b45309;
  background: #fef3c7;
}
.fm-subnav-links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-width: 0;
}
.fm-subnav-links::-webkit-scrollbar { display: none; }
.fm-subnav-link {
  flex-shrink: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  background: transparent;
  border: none;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.fm-subnav-link:hover {
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
}
.fm-subnav-link--guide:hover {
  background: rgba(251, 191, 36, 0.15);
  color: #b45309;
}
.fm-subnav-link--all {
  font-weight: 600;
  color: #0284c7;
}

.fm-mobile-nav { display: none; }
.fm-mobile-nav-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
  margin: 0.75rem 0 0.35rem;
}
.fm-mobile-link {
  display: block;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 0.45rem 0;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.fm-mobile-link:hover { color: var(--fm-gold-light); }

.fm-auth-btns { display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0; }
.fm-auth-btns .fm-btn-ghost { padding: 0.5rem 1rem; font-size: 0.85rem; }
.fm-auth-btns .fm-btn-primary { padding: 0.5rem 1.1rem; font-size: 0.85rem; }

.fm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.92rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

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

.fm-btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}

.fm-btn-primary {
  background: var(--fm-gradient-gold);
  color: #78350f;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.4);
}

.fm-btn-secondary {
  background: var(--fm-surface-warm);
  color: var(--fm-bg);
  border: 1px solid rgba(201,162,77,0.45);
}
.fm-btn-block { width: 100%; margin-top: 0.25rem; }

.fm-ai-section { margin-top: 1.5rem; }
.fm-ai-panel {
  margin-top: 1rem;
  padding: 1.25rem;
  background: var(--fm-surface-warm);
  border-radius: var(--fm-radius-sm);
  border: 1px solid rgba(201,162,77,0.2);
  display: none;
}
.fm-ai-panel.visible { display: block; }
.fm-ai-text h4 { margin: 1rem 0 0.35rem; color: var(--fm-gold); font-size: 1rem; }
.fm-ai-text p { margin: 0.25rem 0; line-height: 1.65; }

.fm-btn-indigo {
  background: linear-gradient(135deg, var(--fm-indigo), var(--fm-indigo-dark));
  color: #fff;
}

/* Hero */
.fm-hero {
  background: var(--fm-gradient);
  color: #fff;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.fm-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 28%, rgba(253, 224, 71, 0.35), transparent 48%),
    radial-gradient(circle at 82% 65%, rgba(56, 189, 248, 0.28), transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(167, 139, 250, 0.2), transparent 55%);
  pointer-events: none;
}

.fm-hero .container { position: relative; z-index: 1; }

.fm-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 820px;
}

.fm-hero p {
  font-size: 1.1rem;
  opacity: 0.92;
  max-width: 640px;
  margin-bottom: 2rem;
}

.fm-hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Cards grid */
.fm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.fm-card {
  background: var(--fm-surface);
  border-radius: var(--fm-radius);
  padding: 1.5rem;
  box-shadow: var(--fm-shadow);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.fm-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(15,20,40,0.12);
}

.fm-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--fm-text);
  margin-bottom: 0.5rem;
}

.fm-card p { color: var(--fm-text-muted); font-size: 0.95rem; margin-bottom: 1rem; }

.fm-card a.fm-link {
  color: var(--fm-indigo);
  font-weight: 600;
  text-decoration: none;
}

/* Content article */
.fm-content {
  background: var(--fm-surface);
  border-radius: var(--fm-radius);
  padding: 2.5rem;
  margin: 2rem 0 3rem;
  box-shadow: var(--fm-shadow);
}

.fm-content h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--fm-bg);
  margin-bottom: 1rem;
}

.fm-content h2 {
  font-size: 1.4rem;
  color: #0e7490;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid rgba(14, 165, 233, 0.25);
}

.fm-content h3 { font-size: 1.15rem; color: var(--fm-bg-soft); margin: 1.25rem 0 0.5rem; }

.fm-content p { margin-bottom: 1rem; text-align: justify; }

.fm-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

.fm-content th, .fm-content td {
  border: 1px solid #e8e4dc;
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.fm-content th { background: #f3efe6; color: var(--fm-bg); }

.fm-highlight {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-left: 4px solid var(--fm-gold);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--fm-radius) var(--fm-radius) 0;
  margin: 1.25rem 0;
}

.fm-breadcrumb {
  font-size: 0.88rem;
  color: var(--fm-text-muted);
  margin-bottom: 1.25rem;
}

.fm-breadcrumb a { color: var(--fm-indigo); text-decoration: none; }

.fm-internal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.fm-internal-links a {
  background: rgba(14, 165, 233, 0.1);
  color: var(--fm-indigo-dark);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Footer */
.fm-footer {
  background: linear-gradient(160deg, #0e7490 0%, #1e40af 50%, #5b21b6 100%);
  color: rgba(255,255,255,0.88);
  padding: 3rem 0 2rem;
  margin-top: 3rem;
}

.fm-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.fm-footer h4 {
  color: var(--fm-gold-light);
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.fm-footer a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}

.fm-footer a:hover { color: var(--fm-gold-light); }

.fm-lang-switch {
  display: flex;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
}

.fm-lang-switch a {
  display: inline;
  color: var(--fm-gold);
  font-weight: 600;
}

.fm-lang-switch a.active { text-decoration: underline; }

.fm-copyright {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: 1.5rem;
}

/* Tool pages */
.fm-page-tool .fm-main--tool { max-width: 1320px; padding-bottom: 3rem; }
.fm-content--tool {
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0 0 2rem;
}

.fm-tool-shell {
  display: grid;
  grid-template-columns: minmax(300px, 360px) 1fr;
  gap: 1.5rem;
  align-items: start;
  min-height: 520px;
}

.fm-tool-panel {
  position: sticky;
  top: calc(var(--fm-header-h) + 1rem);
  background: var(--fm-surface);
  border-radius: var(--fm-radius);
  padding: 1.35rem;
  box-shadow: var(--fm-shadow-soft);
  border: 1px solid rgba(12,16,32,0.06);
}

.fm-tool-tips {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid #eee;
  font-size: 0.88rem;
  color: var(--fm-text-muted);
}
.fm-tool-tips h3 { font-size: 0.95rem; color: var(--fm-bg); margin-bottom: 0.5rem; }

.fm-tool-stage {
  background: var(--fm-surface);
  border-radius: var(--fm-radius);
  min-height: 480px;
  box-shadow: var(--fm-shadow-soft);
  border: 1px solid rgba(12,16,32,0.06);
  overflow: hidden;
}

.fm-tool-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 480px;
  padding: 3rem 2rem;
  background:
    radial-gradient(circle at 50% 20%, rgba(251, 191, 36, 0.12), transparent 55%),
    linear-gradient(180deg, #f0f9ff 0%, #fffbeb 100%);
}
.fm-tool-empty-visual {
  width: 5rem; height: 5rem;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0891b2, #6366f1);
  border-radius: 50%;
  margin-bottom: 1.25rem;
  box-shadow: 0 12px 32px rgba(8, 145, 178, 0.25);
}
.fm-tool-empty-visual span { font-size: 2rem; color: #fef9c3; }
.fm-tool-empty h3 { font-family: var(--font-display); font-size: 1.5rem; color: #0f766e; margin-bottom: 0.5rem; }
.fm-tool-empty p { color: var(--fm-text-muted); max-width: 320px; font-size: 0.95rem; }

.fm-form { margin: 0; }
.fm-form--tool label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  color: var(--fm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fm-form input, .fm-form select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #dde1ea;
  border-radius: var(--fm-radius-sm);
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
  background: #fafbfd;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fm-form input:focus, .fm-form select:focus {
  outline: none;
  border-color: var(--fm-indigo);
  box-shadow: 0 0 0 3px rgba(91,111,214,0.12);
  background: #fff;
}

.fm-result {
  display: none;
  padding: 1.75rem 2rem 2rem;
}
.fm-result.visible { display: block; }
.fm-result--stage { min-height: 480px; }

.fm-result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}
.fm-result-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  color: var(--fm-bg);
  font-weight: 600;
}
.fm-result-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.fm-result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.fm-result-grid--3 { grid-template-columns: repeat(2, 1fr); }

.fm-result-card {
  background: var(--fm-surface-warm);
  border: 1px solid rgba(12,16,32,0.05);
  border-radius: var(--fm-radius-sm);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
}
.fm-result-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0e7490;
  margin-bottom: 0.65rem;
}
.fm-result-card-body p { margin: 0; line-height: 1.65; }
.fm-lead-compact { font-size: 0.95rem; line-height: 1.7; }

.fm-upsell {
  background: linear-gradient(135deg, #e0f2fe, #fef3c7);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--fm-radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}
.fm-upsell a { color: var(--fm-indigo-dark); font-weight: 600; }

.fm-lead { font-size: 1.05rem; line-height: 1.85; margin-bottom: 1.5rem; }
.fm-figure { margin: 1.5rem 0; text-align: center; }
.fm-figure img { max-width: 100%; border-radius: var(--fm-radius); box-shadow: var(--fm-shadow); }
.fm-figure figcaption { font-size: 0.88rem; color: var(--fm-text-muted); margin-top: 0.5rem; }
.fm-faq h3 { font-size: 1.05rem; margin-top: 1rem; color: var(--fm-bg-soft); }
.fm-cta-box { text-align: center; margin-top: 2.5rem; padding: 2rem; background: linear-gradient(135deg, #f8f4ea, #eef2ff); border-radius: var(--fm-radius); }
.fm-footer-desc { font-size: 0.92rem; opacity: 0.8; }
.fm-hero--image { position: relative; }
.fm-hero--image::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(8,145,178,0.82), rgba(37,99,235,0.78)),
    var(--hero-image) center/cover no-repeat;
  z-index: 0;
}
.fm-hero-inner { position: relative; z-index: 1; }
.fm-main { padding-bottom: 2rem; }

.fm-menu-btn {
  display: none;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.fm-nav-panel { display: flex; align-items: center; gap: 1rem; flex: 1; justify-content: flex-end; }

.fm-hint { font-size: 0.85rem; color: var(--fm-text-muted); margin-top: 0.35rem; line-height: 1.55; }
.fm-alert { padding: 0.75rem 0.9rem; border-radius: var(--fm-radius-sm); margin: 0 0 1rem; font-size: 0.85rem; line-height: 1.5; }
.fm-alert-info { background: #e0f2fe; color: #0369a1; border: 1px solid rgba(14, 165, 233, 0.25); }
.fm-alert-warn { background: #fef3c7; color: #b45309; border: 1px solid rgba(245, 158, 11, 0.35); }

.fm-pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin: 0 0 1.5rem; }
.fm-pillars--premium .fm-pillar {
  background: linear-gradient(160deg, #fff 0%, #fffbeb 100%);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--fm-radius-sm);
  padding: 1rem 0.75rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(12,16,32,0.04);
}
.fm-pillar-label { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fm-text-muted); margin-bottom: 0.35rem; }
.fm-pillar-value { display: block; font-family: var(--font-display); font-size: 1.35rem; color: #0e7490; letter-spacing: 0.05em; }

.fm-wuxing-bars { display: flex; flex-direction: column; gap: 0.55rem; }
.fm-wuxing-row { display: grid; grid-template-columns: 2rem 1fr 1.5rem; align-items: center; gap: 0.5rem; }
.fm-wuxing-label { font-weight: 700; font-size: 0.9rem; }
.fm-wuxing-track { height: 8px; background: #e8eaef; border-radius: 999px; overflow: hidden; }
.fm-wuxing-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.fm-wuxing-木 { color: var(--fm-wood); } .fm-wuxing-fill.fm-wuxing-木 { background: var(--fm-wood); }
.fm-wuxing-火 { color: var(--fm-fire); } .fm-wuxing-fill.fm-wuxing-火 { background: var(--fm-fire); }
.fm-wuxing-土 { color: var(--fm-earth); } .fm-wuxing-fill.fm-wuxing-土 { background: var(--fm-earth); }
.fm-wuxing-金 { color: var(--fm-metal); } .fm-wuxing-fill.fm-wuxing-金 { background: var(--fm-metal); }
.fm-wuxing-水 { color: var(--fm-water); } .fm-wuxing-fill.fm-wuxing-水 { background: var(--fm-water); }
.fm-wuxing-num { font-size: 0.82rem; font-weight: 600; color: var(--fm-text-muted); text-align: right; }

.fm-dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.65rem 1rem; margin: 0; }
.fm-dl-grid div { margin: 0; }
.fm-dl-grid dt { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fm-text-muted); margin-bottom: 0.15rem; }
.fm-dl-grid dd { margin: 0; font-weight: 600; color: var(--fm-bg); font-size: 0.95rem; }
.fm-dl-wide { grid-column: 1 / -1; }

.fm-tag-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.fm-tag {
  display: inline-block;
  background: #fff;
  border: 1px solid #e5e8ef;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--fm-text);
}

.fm-analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.fm-analysis-item {
  background: #fff;
  border-radius: 10px;
  padding: 0.75rem;
  border: 1px solid #eee;
}
.fm-analysis-item strong { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fm-indigo-dark); margin-bottom: 0.35rem; }
.fm-analysis-item p { font-size: 0.88rem; line-height: 1.55; margin: 0; color: var(--fm-text); }

.fm-chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0; margin: 0; }
.fm-chip-list li {
  background: #fff;
  border: 1px solid rgba(201,162,77,0.25);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.fm-badge-soft { background: rgba(91,111,214,0.12); color: var(--fm-indigo-dark); }
.fm-list-compact { padding-left: 1.1rem; margin: 0.35rem 0; }
.fm-list-compact li { margin-bottom: 0.4rem; line-height: 1.55; }
.fm-table-compact { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.fm-table-compact th, .fm-table-compact td { border: 1px solid #e8e4dc; padding: 0.45rem 0.65rem; text-align: left; }
.fm-score-badge { display: inline-block; background: linear-gradient(135deg, #f5e6c8, #e8d4a8); color: #5c4a1a; padding: 0.35rem 0.85rem; border-radius: 999px; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.75rem; }
.fm-score-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 0.5rem; margin: 1rem 0; }
.fm-score-item { background: #faf8f4; border: 1px solid #e8e4dc; border-radius: 10px; padding: 0.65rem; text-align: center; }
.fm-score-item span { display: block; font-size: 0.75rem; color: var(--fm-text-muted); }
.fm-score-item strong { font-size: 1.15rem; color: var(--fm-indigo-dark); }
.fm-name-grid { display: grid; gap: 1rem; margin-top: 0.5rem; }
.fm-name-grid--2 { grid-template-columns: repeat(2, 1fr); }
.fm-name-card {
  background: #fff;
  border: 1px solid rgba(12,16,32,0.06);
  border-radius: var(--fm-radius-sm);
  padding: 1.15rem 1.25rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.fm-name-card:hover {
  border-color: rgba(201,162,77,0.35);
  box-shadow: 0 8px 24px rgba(12,16,32,0.06);
}
.fm-name-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.35rem; }
.fm-name-main { font-family: var(--font-display); font-size: 1.35rem; color: var(--fm-bg); letter-spacing: 0.08em; }
.fm-score-pill {
  background: var(--fm-gradient-gold);
  color: #78350f;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.fm-name-meta { font-size: 0.85rem; color: var(--fm-text-muted); margin-bottom: 0.35rem; }
.fm-name-meaning { font-size: 0.92rem; line-height: 1.55; margin-bottom: 0.5rem; }
.fm-name-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
.fm-name-note { font-size: 0.85rem; color: var(--fm-indigo-dark); margin-bottom: 0.35rem; }
.fm-name-en { font-size: 0.85rem; margin-bottom: 0.35rem; }
.fm-name-en span { background: var(--fm-bg-soft); color: var(--fm-gold-light); font-size: 0.7rem; font-weight: 700; padding: 0.1rem 0.35rem; border-radius: 4px; margin-right: 0.35rem; }
.fm-name-classic { font-size: 0.8rem; color: var(--fm-text-muted); font-style: italic; line-height: 1.5; }
.fm-bazi-ref { margin-bottom: 1rem; }
.fm-badge { display: inline-block; background: var(--fm-gradient-gold); color: #78350f; font-size: 0.72rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 999px; }
.fm-angel-quick { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.fm-angel-quick button { border: 1px solid #e8e4dc; background: #fff; border-radius: 8px; padding: 0.4rem 0.75rem; cursor: pointer; font-weight: 600; }
.fm-angel-quick button:hover { border-color: var(--fm-gold); background: #fffbf0; }
.fm-loading { display: inline-block; width: 1rem; height: 1rem; border: 2px solid #ccc; border-top-color: var(--fm-gold); border-radius: 50%; animation: fm-spin 0.8s linear infinite; vertical-align: middle; margin-right: 0.5rem; }
@keyframes fm-spin { to { transform: rotate(360deg); } }

.fm-hero--tool {
  padding: 3rem 0 2.5rem;
  background: var(--fm-gradient);
}
.fm-hero--tool h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 0.5rem; }
.fm-hero--tool .fm-hero-sub { font-size: 0.95rem; opacity: 0.85; margin: 0; }

@media (max-width: 1024px) {
  .fm-tool-shell { grid-template-columns: 1fr; }
  .fm-tool-panel { position: static; }
  .fm-name-grid--2 { grid-template-columns: 1fr; }
  .fm-result-grid, .fm-result-grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .fm-pillars { grid-template-columns: repeat(2, 1fr); }
}

/* ── v3 Home & Premium ── */
.fm-hero--home {
  padding: 6.5rem 0 5rem;
  background: var(--fm-gradient);
  position: relative;
  overflow: hidden;
}
.fm-hero--home::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 75% 55% at 72% 18%, rgba(253, 224, 71, 0.4), transparent 55%),
    radial-gradient(circle at 12% 78%, rgba(56, 189, 248, 0.3), transparent 42%),
    radial-gradient(circle at 88% 88%, rgba(192, 132, 252, 0.22), transparent 40%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='1.2' fill='%23fde047' opacity='0.5'/%3E%3C/svg%3E");
  pointer-events: none;
}
.fm-hero--home .fm-hero-inner { position: relative; z-index: 1; }
.fm-hero--home h1 {
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  letter-spacing: 0.01em;
  text-shadow: 0 4px 40px rgba(0,0,0,0.35);
}
.fm-hero--article {
  padding: 4.5rem 0 3.5rem;
  background: linear-gradient(125deg, #0891b2 0%, #2563eb 45%, #7c3aed 100%);
}
.fm-hero--article::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(253, 224, 71, 0.28), transparent 50%);
  pointer-events: none;
}
.fm-hero-sub { font-size: 1.05rem; opacity: 0.88; max-width: 560px; }

.fm-home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0 0 2rem;
  padding: 0;
}
.fm-stat {
  display: flex; flex-direction: column; gap: 0.2rem;
  background: var(--fm-surface);
  border: 1px solid rgba(12,16,32,0.06);
  border-radius: var(--fm-radius-sm);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--fm-shadow-soft);
}
.fm-stat strong {
  font-family: var(--font-display);
  font-size: 1.85rem;
  background: var(--fm-gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.fm-stat span { font-size: 0.85rem; color: var(--fm-text-muted); font-weight: 500; }

.fm-home-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 2.5rem; }
.fm-btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }
.fm-btn-ghost-dark {
  background: rgba(14, 165, 233, 0.08);
  color: #0e7490;
  border: 1px solid rgba(14, 165, 233, 0.22);
}
.fm-section-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: #0f766e;
  margin: 2.5rem 0 0.35rem;
}
.fm-section-desc { color: var(--fm-text-muted); margin-bottom: 1.25rem; font-size: 0.95rem; }

.fm-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.fm-tool-card {
  display: flex; flex-direction: column;
  background: var(--fm-surface);
  border-radius: var(--fm-radius);
  padding: 1.35rem 1.35rem 1.1rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(15,20,40,0.06);
  box-shadow: 0 4px 24px rgba(15,20,40,0.06);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.fm-tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(8, 145, 178, 0.14);
  border-color: rgba(245, 158, 11, 0.4);
}
.fm-tool-icon {
  width: 2.5rem; height: 2.5rem;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0891b2, #6366f1);
  color: #fef9c3;
  border-radius: 12px;
  font-size: 1.1rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 4px 14px rgba(8, 145, 178, 0.25);
}
.fm-tool-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #0f766e;
  margin-bottom: 0.4rem;
}
.fm-tool-card p { font-size: 0.9rem; color: var(--fm-text-muted); flex: 1; margin-bottom: 0.75rem; }
.fm-tool-cta { font-size: 0.88rem; font-weight: 600; color: var(--fm-indigo); }

.fm-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.fm-guide-card {
  display: block;
  padding: 1.35rem;
  background: linear-gradient(145deg, #fff 0%, #fffbeb 100%);
  border-radius: var(--fm-radius);
  border: 1px solid rgba(251, 191, 36, 0.28);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}
.fm-guide-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(212,168,83,0.15);
}
.fm-guide-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b45309;
  background: rgba(251, 191, 36, 0.22);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.6rem;
}
.fm-guide-card h3 { font-size: 1.05rem; color: var(--fm-text); margin-bottom: 0.5rem; line-height: 1.4; }
.fm-guide-link { font-size: 0.88rem; font-weight: 600; color: var(--fm-indigo); }
.fm-home-more { margin: 1.5rem 0 0; }
.fm-link-arrow { color: var(--fm-indigo-dark); font-weight: 600; text-decoration: none; }
.fm-link-arrow:hover { text-decoration: underline; }

.fm-latest-section { margin: 2.5rem 0 2rem; }
.fm-latest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.fm-latest-card {
  background: var(--fm-surface);
  border: 1px solid #eee;
  border-radius: var(--fm-radius);
  padding: 1.25rem 1.35rem;
  box-shadow: 0 8px 28px rgba(15,20,40,0.06);
}
.fm-latest-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fm-gold);
  text-decoration: none;
  margin-bottom: 0.45rem;
}
.fm-latest-card h3 { font-size: 1.08rem; line-height: 1.4; margin-bottom: 0.5rem; }
.fm-latest-card h3 a { color: var(--fm-bg); text-decoration: none; }
.fm-latest-card h3 a:hover { color: var(--fm-indigo-dark); }
.fm-latest-excerpt { font-size: 0.9rem; color: var(--fm-text-muted); line-height: 1.55; margin-bottom: 0.75rem; }
.fm-latest-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--fm-text-muted);
}

.fm-guide-list { list-style: none; }
.fm-guide-list li { margin-bottom: 0.65rem; }
.fm-guide-list a { color: var(--fm-indigo-dark); text-decoration: none; font-weight: 500; }
.fm-guide-list a:hover { text-decoration: underline; }

.fm-meta-strip {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem;
  font-size: 0.82rem; color: var(--fm-text-muted);
  padding-bottom: 1.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
}
.fm-meta-item { display: inline-flex; align-items: center; gap: 0.35rem; }

.fm-figure--premium { margin: 2rem 0; }
.fm-figure-art {
  width: 100%; aspect-ratio: 16/9; max-height: 320px;
  border-radius: var(--fm-radius);
  background: linear-gradient(135deg, #0891b2 0%, #6366f1 50%, #9333ea 100%);
  position: relative; overflow: hidden;
}
.fm-figure-art::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(212,168,83,0.25), transparent 55%);
}
.fm-figure-art--bazi::before {
  content: '年月日時';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem; color: rgba(240,215,140,0.35);
  letter-spacing: 0.5em;
}
.fm-figure-art--tarot::before {
  content: '✦';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; color: rgba(240,215,140,0.3);
}

.fm-grid--2 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.fm-card--soft { background: #faf8f4; border: 1px solid #eee; box-shadow: none; }
.fm-steps { padding-left: 1.25rem; }
.fm-steps li { margin-bottom: 0.65rem; }
.fm-cta-title { font-family: var(--font-display); font-size: 1.35rem; color: var(--fm-bg); margin-bottom: 0.5rem; }

.fm-content { margin-top: 0; position: relative; }

.fm-page-home .fm-content {
  background: transparent;
  box-shadow: none;
  padding: 2rem 0 3rem;
}
.fm-page-home .fm-hero--home { padding-bottom: 3rem; }
.fm-page-home .fm-lead {
  background: var(--fm-surface);
  border-radius: var(--fm-radius);
  padding: 1.35rem 1.5rem;
  border: 1px solid rgba(12,16,32,0.06);
  box-shadow: var(--fm-shadow-soft);
  text-align: left;
}

@media (max-width: 768px) {
  :root { --fm-subnav-h: 0px; }
  .fm-subnav { display: none; }
  .fm-menu-btn { display: inline-flex; }
  .fm-header-bar { flex-wrap: wrap; }
  .fm-nav-panel {
    display: none; flex-direction: column; align-items: stretch;
    width: 100%; padding: 0.75rem 0 1rem; border-top: 1px solid rgba(255,255,255,0.1);
  }
  .fm-nav-panel.open { display: flex; }
  .fm-nav-primary { width: 100%; justify-content: flex-start; }
  .fm-mobile-nav { display: block; width: 100%; }
  .fm-home-stats { grid-template-columns: 1fr; }
  .fm-content { padding: 1.25rem; margin-top: 0; }
  .fm-page-home .fm-content { padding: 1.25rem 0 2rem; }
  .fm-content--tool { padding: 0; }
  .fm-result { padding: 1.25rem; }
  .fm-hero h1 { font-size: 1.75rem; }
  .fm-hero--home { padding: 4.5rem 0 2.5rem; }
}
