/* === TCM Acupoint Massage — Design System === */

:root {
  /* FOREST palette — medicine, life sciences */
  --heading: #166534;
  --accent: #16a34a;
  --accent-light: #22c55e;
  --diagram-fill: #dcfce7;
  --diagram-stroke: #166534;
  --bg-warm: #f0fdf4;
  --text: #1a2e1a;
  --text-soft: #4b7a4b;
  --muted: #6b8a6b;
  --white: #ffffff;
  --caution-bg: #fef3c7;
  --caution-border: #f59e0b;
  --caution-text: #92400e;
  --card-shadow: 0 2px 12px rgba(22, 101, 52, 0.08);
  --card-hover-shadow: 0 4px 20px rgba(22, 101, 52, 0.14);

  /* CALM motion tier */
  --entrance-duration: 0.55s;
  --entrance-easing: cubic-bezier(0.33, 0, 0.67, 1); /* power2.out */
  --beat-gap: 0.5s;
  --stagger: 120ms;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* === DISCLAIMER BAR === */
.disclaimer-bar {
  background: var(--bg-warm);
  border-bottom: 1px solid var(--diagram-fill);
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.disclaimer-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.2rem;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.disclaimer-close:hover {
  opacity: 1;
  color: var(--text);
}

/* === NAVIGATION === */
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: all var(--entrance-duration) var(--entrance-easing);
}

.nav-back:hover {
  background: var(--diagram-fill);
}

.nav-back svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* === LANGUAGE TOGGLE === */
.lang-toggle {
  position: absolute;
  top: 2.8rem;
  right: 1rem;
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--accent);
  font-size: 0.78rem;
  z-index: 101;
}

.lang-toggle button {
  padding: 0.3rem 0.65rem;
  border: none;
  background: var(--white);
  color: var(--text-soft);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lang-toggle button:first-child {
  border-right: 1px solid var(--accent);
}

.lang-toggle button.active {
  background: var(--accent);
  color: var(--white);
}

.lang-toggle button:hover:not(.active) {
  background: var(--diagram-fill);
}

/* === HEADER === */
.header {
  text-align: center;
  padding: 2.5rem 1.5rem 1rem;
}

.header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.header .subtitle {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 520px;
  margin: 0 auto 1rem;
}

/* === SEARCH === */
.search-section {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.12);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
  margin-top: 4px;
}

.search-result-item {
  display: block;
  padding: 0.65rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid #f1f5f9;
}

.search-result-item:last-child { border-bottom: none; }

.search-result-item:hover,
.search-result-item.highlight {
  background: var(--diagram-fill);
}

.search-result-item .sr-name {
  font-weight: 600;
  color: var(--heading);
}

.search-result-item .sr-code {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  margin-right: 0.5rem;
}

.search-result-item .sr-pinyin {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: 0.4rem;
}

.search-result-item .sr-hint {
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-top: 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-empty {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* === LAST VIEWED === */
.last-viewed {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.last-viewed-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.lv-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
}

.lv-row .last-viewed-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}

.last-viewed-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem 0.7rem;
  background: var(--diagram-fill);
  color: var(--heading);
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  max-width: 260px;
}

.last-viewed-chip:hover {
  background: var(--accent);
  color: var(--white);
}

.last-viewed-chip:hover .lv-code,
.last-viewed-chip:hover .lv-name,
.last-viewed-chip:hover .lv-keyword {
  color: var(--white);
}

.lv-code {
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.lv-name {
  color: var(--heading);
  flex-shrink: 0;
}

.lv-keyword {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.72rem;
  flex-shrink: 0;
}

/* === BODY IMAGE + OVERLAY === */
.body-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 1rem 2rem;
  position: relative;
}

.body-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  line-height: 0;
}

.body-img {
  width: 100%;
  height: auto;
  display: block;
}

.body-img.hidden {
  display: none;
}

.body-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Toggle buttons */
.view-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--diagram-stroke);
}

.view-toggle button {
  padding: 0.55rem 1.4rem;
  border: none;
  background: var(--white);
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.view-toggle button:first-child {
  border-right: 1px solid var(--diagram-stroke);
}

.view-toggle button.active {
  background: var(--diagram-stroke);
  color: var(--white);
}

.view-toggle button:hover:not(.active) {
  background: var(--diagram-fill);
}

/* Body region paths (in overlay SVG) */
.body-overlay .region-group {
  pointer-events: all;
}

.body-overlay .region-path {
  fill: transparent;
  stroke: transparent;
  transition: fill 0.4s ease, stroke 0.4s ease;
  cursor: pointer;
  outline: none;
}

.body-overlay .region-path:hover,
.body-overlay .region-path:focus-visible {
  fill: rgba(192, 96, 40, 0.18);
  stroke: #b06030;
  stroke-width: 2;
}

.body-overlay .region-pulse {
  animation: region-glow 2.5s ease-in-out infinite;
}

@keyframes region-glow {
  0%, 100% { fill: rgba(192, 96, 40, 0.07); }
  50%       { fill: rgba(192, 96, 40, 0.16); }
}

/* Region label tooltips */
.region-label {
  font-size: 11px;
  fill: #7a3818;
  font-weight: 600;
  pointer-events: none;
  text-anchor: middle;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-family: system-ui, -apple-system, sans-serif;
}

.body-overlay .region-path:hover ~ .region-label,
.body-overlay .region-group:hover .region-label {
  opacity: 1;
}

/* === LEGEND === */
.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.2rem;
  margin-top: 1rem;
  padding: 0 1rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-soft);
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  transition: all 0.25s ease;
  text-decoration: none;
}

.legend-item:hover {
  background: var(--diagram-fill);
  color: var(--heading);
}

/* === DISABLED REGIONS === */
.region-disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.region-disabled.region-path {
  animation: none !important;
  fill: transparent !important;
}

.region-disabled .legend-item {
  opacity: 0.35;
  pointer-events: none;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* === SECTION REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity var(--entrance-duration) var(--entrance-easing),
              transform var(--entrance-duration) var(--entrance-easing);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === REGION DETAIL PAGE === */
.region-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

.region-detail .region-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.region-detail .region-hero h2 {
  font-size: 1.8rem;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.region-detail .region-hero .common-issue {
  display: block;
  color: var(--text-soft);
  font-size: 0.95rem;
  max-width: 560px;
  margin: 0.6rem auto 0;
  line-height: 1.5;
}

.region-detail .region-hero .blurb {
  color: var(--text-soft);
  max-width: 560px;
  margin: 0 auto;
  font-size: 0.95rem;
}

/* Region mini diagram */
.region-diagram-section {
  margin-bottom: 2rem;
}

.region-diagram-title {
  text-align: center;
  font-size: 1rem;
  color: var(--heading);
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.region-diagram {
  display: flex;
  justify-content: center;
  margin-bottom: 0.8rem;
}

.region-diagram svg {
  width: 100%;
  max-width: 540px;
  height: auto;
}

/* Diagram marker hover */
.diagram-marker {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.diagram-marker:hover {
  filter: drop-shadow(0 2px 6px rgba(176,96,48,0.35));
}

.diagram-marker:hover circle:nth-child(2) {
  fill: #ffe0b8;
  stroke: #8a3810;
}

.marker-keyword-bg,
.marker-keyword {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.diagram-marker:hover .marker-keyword-bg,
.diagram-marker:hover .marker-keyword {
  opacity: 1;
}

/* Diagram legend chips */
.region-diagram-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0.8rem;
  padding: 0 0.5rem;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  font-size: 0.78rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.legend-chip:hover {
  border-color: var(--accent);
  background: var(--diagram-fill);
  color: var(--heading);
}

.legend-chip-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Acupoint cards grid */
.acupoint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  justify-content: center;
}

.acupoint-card {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.2rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  box-shadow: var(--card-shadow);
  position: relative;
}

.acupoint-card .card-num {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(22,163,74,0.25);
}

.acupoint-card:hover {
  border-color: var(--accent);
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-2px);
}

.acupoint-card .card-code {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.acupoint-card .card-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.2rem;
}

.acupoint-card .card-translation {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.6rem;
}

.acupoint-card .card-hint {
  font-size: 0.8rem;
  color: var(--text-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.acupoint-card .card-hint span:first-child {
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.acupoint-card:hover {
  transform: translateX(3px);
}

/* === ACUPOINT DETAIL PAGE === */
.acupoint-detail {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

.acupoint-hero {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #ecfdf5;
}

.acupoint-hero .point-code {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 0.2rem 0.7rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.acupoint-hero .point-meridian {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.acupoint-hero h2 {
  font-size: 1.8rem;
  color: var(--heading);
  margin-bottom: 0.15rem;
}

.acupoint-hero .pinyin {
  font-size: 1rem;
  color: var(--text-soft);
  margin-bottom: 0.15rem;
}

.acupoint-hero .translation {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

/* Point location */
/* === CLOSE-UP DIAGRAM === */
.closeup-container {
  max-width: 380px;
  margin: 0 auto 1.5rem;
}

.closeup-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.closeup-svg {
  width: 100%;
  height: auto;
  display: block;
}

.closeup-caption {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* === POINT LOCATION === */
.point-location {
  background: var(--bg-warm);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.point-location strong {
  color: var(--heading);
}

/* Info columns */
.info-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 600px) {
  .info-columns { grid-template-columns: 1fr; }
}

.info-box {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.2rem;
}

.info-box h3 {
  font-size: 0.9rem;
  color: var(--heading);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.info-box ul {
  list-style: none;
  padding: 0;
}

.info-box li {
  font-size: 0.85rem;
  color: var(--text-soft);
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
}

.info-box li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* Caution banner */
.caution-banner {
  background: var(--caution-bg);
  border: 1px solid var(--caution-border);
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--caution-text);
  line-height: 1.5;
}

.caution-banner .caution-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* === MASSAGE SECTION === */
.massage-section {
  margin-top: 1rem;
}

.massage-section h3 {
  font-size: 1.3rem;
  color: var(--heading);
  text-align: center;
  margin-bottom: 1.2rem;
}

.massage-visual {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 1.5rem;
  aspect-ratio: 1 / 1;
  background: var(--bg-warm);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.massage-svg {
  width: 90%;
  height: 90%;
}

/* --- massage animation --- */
.massage-hand {
  animation: press-knead-lift 2.2s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes press-knead-lift {
  /* approach */
  0%   { transform: translateY(-8px) scale(1); }
  10%  { transform: translateY(-3px) scale(1.02); }
  /* press down */
  20%  { transform: translateY(3px) scale(1.06); opacity: 1; }
  30%  { transform: translateY(3px) scale(1.06); }
  /* knead - small circles */
  35%  { transform: translateY(3px) translateX(-2px) scale(1.06); }
  40%  { transform: translateY(3px) translateX(2px) scale(1.06); }
  45%  { transform: translateY(3px) translateX(0px) scale(1.06); }
  50%  { transform: translateY(3px) translateX(-2px) scale(1.06); }
  55%  { transform: translateY(3px) translateX(2px) scale(1.06); }
  60%  { transform: translateY(3px) translateX(0px) scale(1.06); }
  /* lift */
  70%  { transform: translateY(-3px) scale(1.02); }
  85%  { transform: translateY(-8px) scale(1); }
  100% { transform: translateY(-8px) scale(1); }
}

/* Ripple (pressure wave) */
.massage-ripple-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.massage-ripple {
  position: absolute;
  left: 0;
  top: 0;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: ripple-expand 2.2s ease-out infinite;
}

.massage-ripple:nth-child(2) {
  animation-delay: 0.3s;
}

.massage-ripple:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes ripple-expand {
  0%   { width: 10px; height: 10px; opacity: 0.6; }
  100% { width: 80px; height: 80px; opacity: 0; }
}

/* Point glow pulse */
.massage-point-glow {
  animation: point-breathe 2.2s ease-in-out infinite;
}

@keyframes point-breathe {
  0%, 100% { opacity: 0.5; r: 8; }
  20%       { opacity: 0.2; r: 8; }
  40%       { opacity: 0.9; r: 10; }
  70%       { opacity: 0.3; r: 8; }
}

/* === MASSAGE CONTROLS === */
.massage-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.2rem;
}

.massage-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  background: var(--bg-warm);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-weight: 500;
}

.massage-stat .stat-value {
  color: var(--heading);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.btn-replay {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.2rem;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s ease;
}

.btn-replay:hover {
  background: #15803d;
  transform: scale(1.03);
}

.btn-replay:active {
  transform: scale(0.97);
}

.btn-replay svg {
  width: 16px;
  height: 16px;
}

/* Technique info */
.technique-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.technique-tag {
  font-size: 0.82rem;
  color: var(--heading);
  background: var(--diagram-fill);
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-weight: 500;
}

/* === STEPS LIST === */
.steps-list {
  max-width: 480px;
  margin: 0 auto;
}

.steps-list ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.steps-list li {
  counter-increment: step;
  padding: 0.6rem 0 0.6rem 2.2rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--diagram-fill);
  color: var(--heading);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

  .massage-hand {
    animation: none;
  }

  .massage-ripple {
    animation: none;
    opacity: 0;
  }

  .massage-point-glow {
    animation: none;
  }

  .massage-paused-note {
    display: block !important;
  }
}

.massage-paused-note {
  display: none;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* === FOOTER === */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid #ecfdf5;
}

/* === RESPONSIVE === */
@media (max-width: 500px) {
  .header h1 { font-size: 1.6rem; }
  .header .subtitle { font-size: 0.9rem; }
  .acupoint-hero h2 { font-size: 1.4rem; }
  .acupoint-grid { grid-template-columns: 1fr; }
  .massage-visual { max-width: 100%; }
  .legend { gap: 0.4rem 0.8rem; }
  .legend-item { font-size: 0.75rem; }
}

/* === EDIT MODE === */
.edit-toolbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #1a2e1a;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  z-index: 9999;
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
  max-width: 95vw;
  overflow-x: auto;
}

.edit-toolbar .hud-coords {
  display: none;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.72rem;
  color: #cbd5e1;
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.edit-toolbar.active .hud-coords { display: inline; }

.edit-toolbar .hud-val {
  color: #facc15;
  font-weight: 600;
}

.edit-toolbar .btn-save,
.edit-toolbar .btn-reset,
.edit-toolbar .edit-status {
  display: none;
}

.edit-toolbar.active .btn-save,
.edit-toolbar.active .btn-reset,
.edit-toolbar.active .edit-status {
  display: flex;
}

.edit-toolbar button {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.edit-toolbar .btn-edit-toggle {
  background: #16a34a;
  color: #fff;
}

.edit-toolbar .btn-edit-toggle.off {
  background: #ef4444;
}

.edit-toolbar .btn-save {
  background: #f59e0b;
  color: #1a2e1a;
}

.edit-toolbar .btn-save:hover { background: #d97706; }

.edit-toolbar .btn-reset {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #475569;
}

.edit-toolbar .btn-reset:hover {
  background: #334155;
  color: #fff;
}

.edit-toolbar .edit-status {
  font-size: 0.72rem;
  color: #94a3b8;
  padding: 0 6px;
}

.edit-mode-active .edit-status.saved {
  color: #16a34a;
}

/* Drag cursors */
.edit-draggable {
  cursor: grab;
}

.edit-draggable:active {
  cursor: grabbing;
}

.edit-draggable.dragging {
  cursor: grabbing;
  filter: drop-shadow(0 0 8px rgba(22,163,74,0.6)) !important;
}

.edit-draggable:hover {
  filter: drop-shadow(0 0 4px rgba(239,68,68,0.5));
}

/* Edit mode visual: dashed outline on interactive areas */
body.edit-active .body-overlay .region-path {
  stroke: rgba(239,68,68,0.45) !important;
  stroke-dasharray: 6 3;
  stroke-width: 2;
  fill: rgba(239,68,68,0.08) !important;
}

body.edit-active .body-overlay .region-pulse {
  animation: none !important;
}

body.edit-active .diagram-marker circle:nth-child(2) {
  stroke: #ef4444 !important;
  stroke-dasharray: 4 3;
}

body.edit-active .closeup-frame {
  outline: 2px dashed rgba(239,68,68,0.5);
  outline-offset: 2px;
}

/* Disable navigation clicks in edit mode */
body.edit-active .region-group,
body.edit-active .acupoint-card,
body.edit-active [data-region-link] {
  pointer-events: auto;
}
