:root {
  --cream: #FAF7F2;
  /* Deepened version of the hero's terracotta accent (#B06B5C) — the
     lighter hero tone alone fails AA contrast for button/heading text,
     so this keeps the same warm orange-brown family but dark enough
     to carry white text and body-size headings. */
  --plum: #8B5040;
  --plum-light: #9C6A5D;
  --sage: #A38F7E;
  --sage-light: #DCD0C3;
  --blush: #F2E2DD;
  --dusty-rose: #C98F82;
  --terracotta: #B06B5C;
  --stone: #8C7B6E;
  --text: #2C1F25;
  --text-dark: var(--text);
  --text-light: #7A6570;
  --white: #FFFFFF;
  --border: #E8D4CA;

  --font-display: 'Noto Serif TC', serif;
  --font-body: 'Noto Sans TC', sans-serif;
  --font-accent: 'Cormorant Garamond', serif;

  --radius: 12px;
  --radius-lg: 24px;
  --shadow: 0 4px 24px rgba(61, 36, 53, 0.08);
  --shadow-hover: 0 12px 48px rgba(61, 36, 53, 0.16);
  --t: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Nav ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--plum);
  letter-spacing: 0.05em;
}
.nav-logo span { color: var(--terracotta); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  font-size: 0.9rem;
  color: var(--text-light);
  transition: color var(--t);
  letter-spacing: 0.03em;
}
.nav-links a:hover { color: var(--plum); }
.nav-cta {
  background: var(--plum);
  color: var(--white) !important;
  padding: 0.45rem 1.2rem;
  border-radius: 100px;
  font-size: 0.85rem !important;
  transition: background var(--t), transform var(--t) !important;
}
.nav-cta:hover { background: var(--plum-light) !important; transform: translateY(-1px); }
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.2rem;
  padding: 0.18rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  color: var(--text-light);
  font-size: 0.76rem;
  white-space: nowrap;
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0.2rem 0.42rem;
  border-radius: 999px;
  font-weight: 600;
}
.lang-switch button.active {
  background: var(--plum);
  color: var(--white);
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--plum); margin: 5px 0;
  transition: var(--t);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--t);
  letter-spacing: 0.02em;
}
.btn-primary { background: var(--plum); color: var(--white); }
.btn-primary:hover { background: var(--plum-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--plum); border: 1.5px solid var(--plum); }
.btn-outline:hover { background: var(--plum); color: var(--white); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.8);
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
}
.btn-sage { background: var(--sage); color: var(--white); }
.btn-sage:hover { background: #6a8e6e; transform: translateY(-2px); box-shadow: var(--shadow); }

/* ── Section common ── */
/* Anchor nav links (#stages, #services, #assessments...) land flush under
   the fixed 64px nav without this — heading gets clipped behind it. */
.section { padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 5vw, 4rem); scroll-margin-top: 80px; }
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  /* Full-strength terracotta is ~3.85:1 on cream, below AA for small text;
     darken toward ink for this label-sized use while keeping the accent's hue. */
  color: color-mix(in srgb, var(--terracotta) 65%, var(--text));
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--plum);
  line-height: 1.3;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 540px;
  line-height: 1.8;
}
.container { max-width: 1160px; margin: 0 auto; }
.text-center { text-align: center; }
.text-center .section-sub { margin-left: auto; margin-right: auto; }

/* ── Hero ── */
.hero-wrap {
  background: var(--cream);
  position: relative;
}
.hero {
  max-width: 1160px;
  margin: 0 auto;
  min-height: 90svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  padding: calc(64px + 4.5rem) clamp(1.5rem, 5vw, 4rem) 3.5rem;
}
.hero-eyebrow {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: color-mix(in srgb, var(--terracotta) 65%, var(--text)); margin-bottom: 1.25rem;
}
.hero-eyebrow::before {
  content: ''; display: block; width: 32px; height: 1px; background: var(--terracotta);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  color: var(--plum);
  line-height: 1.2;
  margin-bottom: 1.25rem;
}
.hero-title em {
  font-style: normal;
  color: var(--terracotta);
  white-space: nowrap;
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.85;
  max-width: 440px;
  margin-bottom: 2.25rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Compact meta stats row */
.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  font-size: 0.82rem;
  color: var(--text-light);
  font-family: var(--font-body);
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}
.hero-meta-n {
  font-family: var(--font-accent);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--plum);
  letter-spacing: -0.01em;
}
.hero-meta-l { color: var(--text-light); }
.hero-meta-dot { opacity: 0.35; }

/* ── Hero Bloom (decorative flower/dot composition) ── */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-bloom {
  width: 100%;
  max-width: 380px;
  height: auto;
  overflow: visible;
}
.bloom-drift { animation: bloom-drift 7s ease-in-out infinite; transform-origin: center; }
.bloom-drift-slow { animation: bloom-drift 10s ease-in-out infinite reverse; transform-origin: center; }
@keyframes bloom-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
  .bloom-drift, .bloom-drift-slow { animation: none; }
}


/* ── Life Stages ── */
.stages { background: var(--blush); }
.stages-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}
.stage-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all var(--t);
  cursor: pointer;
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
}
.stage-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--stage-color, var(--sage));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}
.stage-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: var(--border); }
.stage-card:hover::before { transform: scaleX(1); }
.stage-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--stage-bg, #F0F7F1);
  margin: 0 auto 1.25rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  transition: transform var(--t);
}
.stage-card:hover .stage-icon { transform: scale(1.1); }
.stage-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--plum);
  margin-bottom: 0.5rem;
}
.stage-age {
  font-size: 0.75rem;
  color: var(--terracotta);
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}
.stage-desc { font-size: 0.85rem; color: var(--text-light); line-height: 1.7; }

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: center;
}
.about-photo {
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--blush) 0%, var(--sage-light) 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.about-photo-placeholder {
  font-size: 6rem; opacity: 0.4;
}
.about-credentials {
  display: flex; flex-direction: column; gap: 0.75rem;
  margin-top: 2rem;
}
.credential-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  font-size: 0.9rem; color: var(--text-light);
}
.credential-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sage); flex-shrink: 0; margin-top: 0.5rem;
}

/* ── Questionnaire CTA ── */
.quiz-section { background: linear-gradient(165deg, var(--sage-light) 0%, var(--blush) 100%); }
.quiz-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}
.quiz-card {
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: all var(--t);
}
.quiz-card:hover {
  background: rgba(255,255,255,0.14);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
}
.quiz-card-icon { font-size: 2.5rem; margin-bottom: 1.25rem; }
.quiz-card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.quiz-card-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.75;
  margin-bottom: 1.75rem;
}
.quiz-card-time {
  font-size: 0.78rem;
  color: var(--dusty-rose);
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-item {
  display: flex; gap: 1rem; align-items: flex-start;
  margin-bottom: 1.75rem;
}
.contact-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--blush);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.contact-label { font-size: 0.8rem; color: var(--text-light); letter-spacing: 0.05em; }
.contact-value { font-size: 0.95rem; color: var(--text); margin-top: 0.15rem; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.85rem; color: var(--text-light); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--t);
  outline: none;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--sage); }
.form-group textarea { resize: vertical; min-height: 120px; }

/* ── Footer ── */
.footer {
  background: var(--plum);
  color: rgba(255,255,255,0.6);
  padding: 3rem clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  font-size: 0.85rem;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}

/* ── Quiz pages ── */
.quiz-page { min-height: 100svh; }
.quiz-header {
  background: var(--blush);
  padding: 3.5rem clamp(1.5rem, 5vw, 4rem) 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.quiz-body { padding: 3rem clamp(1.5rem, 5vw, 4rem); max-width: 800px; margin: 0 auto; }
.quiz-progress {
  background: var(--border);
  height: 4px; border-radius: 100px;
  margin-bottom: 3rem; overflow: hidden;
}
.quiz-progress-bar {
  height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--sage), var(--terracotta));
  transition: width 0.4s ease;
}
.quiz-section-block { margin-bottom: 2.5rem; }
.quiz-section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--plum);
  padding: 0.5rem 0;
  border-bottom: 2px solid var(--blush);
  margin-bottom: 1.5rem;
}
.question-block { margin-bottom: 1.5rem; }
.question-text {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}
.question-text.required::after { content: ' *'; color: var(--terracotta); }
.options-scale { display: flex; gap: 0.5rem; }
.options-scale input { display: none; }
.options-scale label {
  flex: 1; text-align: center;
  padding: 0.6rem 0.25rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.78rem;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--t);
  line-height: 1.4;
}
.options-scale input:checked + label {
  background: var(--plum);
  border-color: var(--plum);
  color: var(--white);
}
.options-scale label:hover { border-color: var(--plum); color: var(--plum); }

.options-radio { display: flex; flex-direction: column; gap: 0.5rem; }
.options-radio input { display: none; }
.options-radio label {
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  transition: all var(--t);
}
.options-radio input:checked + label {
  background: var(--blush);
  border-color: var(--dusty-rose);
  color: var(--plum);
  font-weight: 500;
}
.options-radio label:hover { border-color: var(--dusty-rose); }

.options-checkbox { display: flex; flex-direction: column; gap: 0.5rem; }
.options-checkbox label {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  transition: all var(--t);
}
.options-checkbox input[type="checkbox"] {
  width: 16px; height: 16px; flex-shrink: 0;
  accent-color: var(--plum);
}
.options-checkbox label:hover { border-color: var(--dusty-rose); }
.options-checkbox label:has(input:checked) {
  background: var(--blush); border-color: var(--dusty-rose); color: var(--plum);
}

.quiz-actions {
  display: flex; justify-content: center; gap: 1rem;
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* ── Results ── */
.result-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1.5px solid var(--border);
  margin-bottom: 1.5rem;
  display: none;
}
.result-card.active { display: block; }
.result-header {
  display: flex; align-items: center; gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.result-badge {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--blush);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.result-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--plum);
  margin-bottom: 0.25rem;
}
.result-subtitle { font-size: 0.85rem; color: var(--text-light); }
.result-score-bar {
  background: var(--blush);
  height: 8px; border-radius: 100px;
  margin: 0.75rem 0 1.5rem; overflow: hidden;
}
.result-score-fill {
  height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--sage), var(--terracotta));
  transition: width 0.8s ease 0.2s;
}
.result-section { margin-bottom: 1.25rem; }
.result-section-title {
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--terracotta); margin-bottom: 0.5rem;
}
.result-section p { font-size: 0.92rem; color: var(--text-light); line-height: 1.8; }
.result-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.result-tag {
  padding: 0.3rem 0.85rem;
  background: var(--blush);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--plum);
}
.result-warning {
  background: #FFF8E7;
  border: 1.5px solid #F0D58C;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: #7A5C1E;
  margin-top: 1.5rem;
  display: flex; gap: 0.75rem; align-items: flex-start;
}
.results-container { display: none; }
.results-container.active { display: block; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: left; min-height: auto; padding-bottom: 3rem; }
  .hero-desc { margin: 0 0 2rem; }
  .hero-actions { justify-content: flex-start; }
  .hero-meta { justify-content: flex-start; }
  .hero-eyebrow { justify-content: flex-start; }
  .hero-visual { display: none; }
  .stages-grid { grid-template-columns: repeat(2, 1fr); }
  .stages-grid .stage-card:last-child { grid-column: 1 / -1; max-width: 260px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-photo { max-width: 320px; margin: 0 auto; }
  .quiz-cards { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .nav-links { display: none; }
  .lang-switch { margin-left: auto; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 64px; left: 0; right: 0;
    background: var(--cream);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    gap: 1.25rem;
  }
}
@media (max-width: 520px) {
  .stages-grid { grid-template-columns: 1fr; }
  .stages-grid .stage-card:last-child { max-width: 100%; }
  .options-scale { flex-wrap: wrap; }
  .options-scale label { min-width: calc(33% - 0.5rem); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }

}

/* ── Visual Editor ── */
#editor-bar {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999;
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem;
}
#ed-btn {
  background: var(--plum); color: var(--white);
  border: none; border-radius: 100px;
  padding: 0.7rem 1.3rem; font-family: var(--font-body); font-size: 0.9rem;
  cursor: pointer; box-shadow: 0 4px 20px rgba(61,36,53,0.35);
  display: flex; align-items: center; gap: 0.4rem;
  transition: background var(--t);
}
#ed-btn:hover { background: var(--plum-light); }
#ed-controls {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 0.75rem 1rem; box-shadow: var(--shadow-hover);
  display: flex; gap: 0.5rem; align-items: center;
  border: 1.5px solid var(--border);
}
.ed-save {
  background: var(--sage); color: var(--white);
  border: none; border-radius: 100px;
  padding: 0.55rem 1.1rem; font-family: var(--font-body); font-size: 0.85rem;
  cursor: pointer; font-weight: 500;
}
.ed-save:hover { background: #6a8e6e; }
.ed-cancel {
  background: var(--blush); color: var(--plum);
  border: none; border-radius: 100px;
  padding: 0.55rem 1rem; font-family: var(--font-body); font-size: 0.85rem;
  cursor: pointer;
}
.ed-cancel:hover { background: var(--border); }
.ed-reset {
  background: none; color: var(--text-light);
  border: 1.5px solid var(--border); border-radius: 100px;
  padding: 0.45rem 0.9rem; font-family: var(--font-body); font-size: 0.8rem;
  cursor: pointer;
}
.ed-reset:hover { color: var(--terracotta); border-color: var(--terracotta); }

/* Edit mode */
.edit-mode [data-edit] {
  outline: 2px dashed var(--sage);
  outline-offset: 3px;
  border-radius: 4px;
  cursor: text;
  min-height: 1em;
  transition: outline-color 0.2s;
}
.edit-mode [data-edit]:hover { outline-color: var(--terracotta); }
.edit-mode [data-edit]:focus {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  background: rgba(196, 135, 106, 0.06);
}
.edit-mode::before {
  content: '✏️ 編輯模式｜點選任何文字即可修改';
  position: fixed; top: 64px; left: 0; right: 0;
  background: var(--terracotta); color: var(--white);
  text-align: center; font-size: 0.82rem; padding: 0.4rem;
  z-index: 9998; font-family: var(--font-body);
}

/* Toast */
#ed-toast {
  position: fixed; bottom: 5rem; right: 1.5rem;
  background: var(--plum); color: var(--white);
  padding: 0.65rem 1.25rem; border-radius: 100px;
  font-size: 0.85rem; z-index: 10000; font-family: var(--font-body);
  animation: edToast 3s ease forwards;
  pointer-events: none;
}
@keyframes edToast {
  0%   { opacity: 0; transform: translateY(8px); }
  15%  { opacity: 1; transform: translateY(0); }
  80%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ── Format Toolbar ── */
#fmt-bar {
  position: fixed; z-index: 99999;
  display: none; align-items: center; flex-wrap: wrap; gap: 4px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 6px 10px;
  box-shadow: 0 6px 32px rgba(61,36,53,0.18);
  pointer-events: all;
}
#fmt-bar select {
  padding: 4px 6px; border: 1.5px solid var(--border); border-radius: 8px;
  font-family: var(--font-body); font-size: 0.78rem; color: var(--text);
  background: var(--cream); cursor: pointer; outline: none; max-width: 170px;
}
.fb-sep { width: 1px; height: 20px; background: var(--border); margin: 0 2px; }
.fb-btn {
  background: none; border: 1.5px solid transparent;
  border-radius: 7px; width: 30px; height: 30px;
  font-family: var(--font-body); font-size: 0.82rem; cursor: pointer;
  color: var(--text); transition: all .15s; display: flex; align-items: center; justify-content: center;
}
.fb-btn:hover { background: var(--blush); border-color: var(--border); }
.fb-btn.active { background: var(--plum); color: var(--white); border-color: var(--plum); }
#fb-sz { font-size: 0.78rem; color: var(--text-light); min-width: 32px; text-align: center; }
.fb-color {
  display: flex; align-items: center; gap: 3px;
  background: var(--cream); border: 1.5px solid var(--border); border-radius: 8px;
  padding: 3px 6px; cursor: pointer; font-size: 0.8rem; font-family: var(--font-body);
}
.fb-color input[type=color] {
  width: 18px; height: 18px; border: none; border-radius: 4px;
  padding: 0; cursor: pointer; background: none;
}

/* ── Drag handles ── */
[data-drag] { cursor: default; }
.drag-ready { cursor: grab !important; transition: box-shadow var(--t); }
.drag-ready:hover { box-shadow: 0 0 0 3px var(--sage), var(--shadow-hover); }
.drag-on { cursor: grabbing !important; box-shadow: 0 0 0 3px var(--terracotta), var(--shadow-hover) !important; }

.edit-mode .drag-ready::after {
  content: '✥ 拖動';
  position: absolute; top: 8px; right: 8px;
  background: var(--sage); color: var(--white);
  font-size: 0.7rem; font-family: var(--font-body);
  padding: 3px 8px; border-radius: 100px;
  pointer-events: none; z-index: 10; opacity: 0.9;
}
.edit-mode [data-edit] { position: relative; }
.edit-mode [data-edit]::before {
  content: attr(data-edit-label);
  position: absolute; top: -18px; left: 0;
  background: var(--sage); color: var(--white);
  font-size: 0.6rem; font-family: var(--font-body);
  padding: 1px 6px; border-radius: 4px;
  white-space: nowrap; pointer-events: none; z-index: 5;
  opacity: 0; transition: opacity .2s;
}
.edit-mode [data-edit]:hover::before { opacity: 1; }
