:root {
  --ink: #14201a;
  --muted: #5f6b63;
  --line: #e3e9e4;
  --bg: #f6f8f6;
  --card: #ffffff;
  --accent: #0f9d58;
  --accent-ink: #0a6e3c;
  --amber: #e08a1e;
  --shadow: 0 1px 2px rgba(20, 32, 26, .06), 0 8px 24px rgba(20, 32, 26, .06);
  --radius: 14px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #0c3b27 0%, #0f9d58 100%);
  color: #fff;
  padding: 26px 20px;
}
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  font-size: 30px;
  line-height: 1;
  color: #bff5d6;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.2));
}
.hero h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .5px;
}
.brand-sub { font-weight: 500; opacity: .9; font-size: 20px; }
.tagline { margin: 2px 0 0; font-size: 13px; opacity: .85; letter-spacing: .3px; }

.search { flex: 1 1 280px; max-width: 420px; }
.search input {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  background: rgba(255,255,255,.95);
  color: var(--ink);
  outline: none;
}
.search input::placeholder { color: #8a958e; }

/* ---------- Controls ---------- */
.controls {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: flex-start;
}
.control-group { display: flex; flex-direction: column; gap: 8px; }
.control-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: .15s;
}
.chip:hover { border-color: var(--accent); }
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.select {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 14px;
  color: var(--ink);
  min-width: 180px;
}
.control-count { margin-left: auto; }
.count { font-size: 14px; color: var(--muted); font-weight: 600; }

/* ---------- Grid ---------- */
.grid {
  max-width: 1180px;
  margin: 12px auto 0;
  padding: 8px 20px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(20,32,26,.1), 0 14px 34px rgba(20,32,26,.12); }
.card-media {
  aspect-ratio: 1 / 1;
  background: #eef2ee;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.name-zh { font-size: 16px; font-weight: 700; line-height: 1.3; }
.name-en { font-size: 12.5px; color: var(--muted); letter-spacing: .2px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef4ef;
  color: var(--accent-ink);
  font-weight: 600;
}
.tag.eq { background: #fbf0df; color: #9a5e10; }

/* ---------- Empty / Load more ---------- */
.empty { max-width: 1180px; margin: 40px auto; text-align: center; color: var(--muted); }
.loadmore-wrap { text-align: center; padding: 28px 0 48px; }
.loadmore {
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
  padding: 11px 26px;
  border-radius: 999px;
  cursor: pointer;
}
.loadmore:hover { background: var(--accent); color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  margin-top: 12px;
  padding: 22px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.site-footer a { color: var(--accent-ink); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 20, 15, .55); backdrop-filter: blur(2px); }
.modal-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-close {
  position: absolute; top: 10px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.85); color: #333;
  font-size: 22px; line-height: 1; cursor: pointer; z-index: 2;
}
.modal-hero { background: #0c3b27; color: #fff; padding: 22px 24px; display: flex; gap: 18px; align-items: center; }
.modal-hero img { width: 120px; height: 120px; border-radius: 12px; object-fit: cover; background: #eef2ee; flex: none; }
.modal-hero h2 { margin: 0; font-size: 22px; }
.modal-hero .m-en { opacity: .85; font-size: 14px; margin-top: 2px; }
.modal-hero .m-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.modal-hero .m-tags .tag { background: rgba(255,255,255,.16); color: #eafff2; }
.modal-hero .m-tags .tag.eq { background: rgba(255,255,255,.16); color: #ffe7c2; }

.modal-section { padding: 18px 24px; border-bottom: 1px solid var(--line); }
.modal-section:last-child { border-bottom: none; }
.section-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--accent-ink); margin: 0 0 10px;
}
.lang-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.bilingual { display: flex; flex-direction: column; gap: 8px; }
.bilingual .zh { font-size: 15px; }
.bilingual .en { font-size: 13.5px; color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.steps li { position: relative; padding-left: 38px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.steps .zh { font-size: 14.5px; }
.steps .en { font-size: 13px; color: var(--muted); margin-top: 2px; }
.muscles { display: flex; flex-wrap: wrap; gap: 6px; }
.muscles .tag { background: #eef4ef; color: var(--accent-ink); }
.attrib { font-size: 12px; color: var(--muted); }

@media (max-width: 560px) {
  .hero h1 { font-size: 22px; }
  .brand-sub { font-size: 17px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .modal-hero { flex-direction: column; text-align: center; }
}
