/* Exercise Search — 配色は Nord (https://www.nordtheme.com/)。
   上の体の図だけは濃紺の地にして、筋肉の赤 (Nord の aurora red) を主役にしています。 */
:root {
  color-scheme: light;
  --night: #2e3440;      /* 体の図の地 */
  --night-2: #3b4252;
  --night-3: #434c5e;
  --bg: #eceff4;
  --surface: #ffffff;
  --surface-2: #e5e9f0;
  --ink: #2e3440;
  --muted: #4c566a;
  --line: #d8dee9;
  --frost: #5e81ac;      /* 操作の色 */
  --frost-ink: #ffffff;
  --frost-soft: #dfe7f1;
  --muscle: #bf616a;     /* 主に使う筋肉 */
  --muscle-2: #ebcb8b;   /* 補助で使う筋肉 */
  --display: "Barlow Condensed", "Hiragino Sans", "Noto Sans JP", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --radius-lg: 18px;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --night: #242933;
    --night-2: #2e3440;
    --night-3: #3b4252;
    --bg: #2e3440;
    --surface: #3b4252;
    --surface-2: #434c5e;
    --ink: #eceff4;
    --muted: #d8dee9;
    --line: #4c566a;
    --frost: #88c0d0;
    --frost-ink: #2e3440;
    --frost-soft: #434c5e;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
a { color: var(--frost); }
img { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid #88c0d0; outline-offset: 2px; }

/* ---- ヘッダー (体の図と同じ地でつなげる) ---- */
.top { background: var(--night); color: #eceff4; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 54px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #eceff4; text-decoration: none; font: 700 1.25rem/1 var(--display); letter-spacing: 0.02em; }
.lang-pick select { padding: 6px 10px; border-radius: 10px; border: 1px solid #4c566a; background: var(--night-2); color: #eceff4; font-size: 0.92rem; }

/* ---- ヒーロー: 左に検索、右に大きな体の図 ---- */
.hero { background: var(--night); color: #eceff4; padding: 18px 0 26px; overflow: hidden; }
.hero-grid { display: grid; gap: 18px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1fr 440px; gap: 40px; } }
.hero h1 {
  margin: 0 0 6px; font: 800 clamp(2.4rem, 7vw, 4.6rem)/0.95 var(--display);
  letter-spacing: 0.005em; text-wrap: balance;
}
:lang(ja) .hero h1, :lang(zh-CN) .hero h1 { font-size: clamp(2rem, 5.6vw, 3.4rem); line-height: 1.15; font-weight: 800; }
.hero-sub { margin: 0 0 16px; color: #d8dee9; font-size: 1.05rem; max-width: 34em; }
.searchbox { position: relative; max-width: 620px; }
.search-icon { position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: #4c566a; pointer-events: none; }
.searchbox input {
  width: 100%; font-size: 1.12rem; padding: 15px 18px 15px 48px;
  border: 2px solid transparent; border-radius: 999px; background: #eceff4; color: #2e3440;
}
.searchbox input:focus { outline: none; border-color: #88c0d0; background: #fff; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.examples button {
  border: 1px solid #4c566a; background: var(--night-2); color: #e5e9f0;
  border-radius: 999px; padding: 5px 12px; font-size: 0.88rem;
}
.examples button:hover { border-color: #88c0d0; color: #fff; }
.understood { margin: 14px 0 0; font-size: 0.95rem; color: #d8dee9; }
.understood[hidden] { display: none; }
.understood b { background: var(--muscle); color: #fff; border-radius: 999px; padding: 2px 12px; margin: 4px 4px 0 0; font-weight: 600; display: inline-block; }

/* ---- 体の図 (ヒートマップ) ---- */
.hero-map { position: relative; }
.bodymap { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 440px; margin: 0 auto; }
@media (max-width: 899px) { .bodymap { max-width: 330px; } }
.fig { margin: 0; text-align: center; }
.fig figcaption { font: 600 0.95rem/1.2 var(--display); color: #81a1c1; letter-spacing: 0.04em; margin-top: 4px; }
.fig-stack { position: relative; cursor: pointer; }
.fig-stack img { display: block; width: 100%; height: auto; }
/* 灰色の解剖図を濃紺の地で読めるよう、少し明るくして地に溶かします。 */
.hero .fig-base { filter: brightness(1.25) contrast(0.9); mix-blend-mode: screen; opacity: 0.9; }
.fig-stack .ov { position: absolute; left: 0; top: 0; width: 100%; height: auto; pointer-events: none; transition: opacity 0.25s ease; }
.fig-stack .ov.sel { filter: drop-shadow(0 0 6px rgba(191, 97, 106, 0.9)); }
.fig-stack .ov.hover { filter: drop-shadow(0 0 5px rgba(236, 239, 244, 0.9)); }
.fig-stack.mini { cursor: default; }
.map-tip {
  position: absolute; z-index: 3; pointer-events: none; transform: translate(-50%, -120%);
  background: #eceff4; color: #2e3440; border-radius: 10px; padding: 6px 10px; white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); font-size: 0.88rem;
}
.map-tip[hidden] { display: none; }
.map-tip b { display: block; font: 700 1.05rem/1.1 var(--display); }
.heat-legend { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; font-size: 0.78rem; color: #81a1c1; }
.heat-legend .ramp { display: inline-block; width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(191, 97, 106, 0.18), rgba(191, 97, 106, 1)); }
/* 最初の 1 回だけ、筋肉が順に灯ります (動きを減らす設定なら灯りません)。 */
@media (prefers-reduced-motion: no-preference) {
  .bodymap.intro .ov { animation: glow-in 0.9s ease both; }
  @keyframes glow-in { from { opacity: 0; } }
}

/* ---- 使い方の 3 段 (操作に合わせて灯る) ---- */
.flow { margin-top: -18px; position: relative; z-index: 2; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(46, 52, 64, 0.12); overflow: hidden; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 14px 16px; position: relative; }
.steps li + li { border-left: 1px solid var(--line); }
.steps .n {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font: 700 1.15rem/1 var(--display); background: var(--surface-2); color: var(--muted); transition: background 0.2s, color 0.2s;
}
.steps strong { display: block; font-size: 0.98rem; }
.steps em { display: block; font-style: normal; font-size: 0.84rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.steps li.done .n { background: var(--muscle); color: #fff; }
.steps li.done em { color: var(--muscle); font-weight: 600; }
.steps li.next .n { background: var(--frost); color: var(--frost-ink); }
/* スマホでは 3 段を横に並べたまま小さくし、説明は済んだ段だけ出します。 */
@media (max-width: 720px) {
  .steps li { flex-direction: column; text-align: center; gap: 6px; padding: 10px 6px; }
  .steps strong { font-size: 0.82rem; line-height: 1.25; }
  .steps em { display: none; max-width: 12ch; margin: 0 auto; }
  .steps li.done em { display: block; font-size: 0.76rem; }
  .steps .n { width: 30px; height: 30px; }
}

/* ---- 絞り込み ---- */
.toolbar { margin: 20px 0 8px; display: grid; gap: 10px; }
.eq-chips, .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.eq-chips button, .chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 6px 12px; font-size: 0.88rem; display: inline-flex; gap: 6px; align-items: baseline;
}
.eq-chips button small, .chip small { color: var(--muted); font-size: 0.76rem; }
.eq-chips button[aria-pressed="true"] { background: var(--frost); border-color: var(--frost); color: var(--frost-ink); }
.eq-chips button[aria-pressed="true"] small { color: inherit; opacity: 0.8; }
.chip[aria-pressed="true"] { background: var(--muscle); border-color: var(--muscle); color: #fff; }
.chip[aria-pressed="true"] small { color: inherit; opacity: 0.85; }
.chip.hover { border-color: var(--muscle); }
/* 筋肉のボタンは体の図の下 (濃紺の地) に置き、図に無い筋肉もここで選べます。 */
.muscle-chips { justify-content: center; margin-top: 12px; max-width: 520px; margin-left: auto; margin-right: auto; }
.muscle-chips .chip { font-size: 0.8rem; padding: 3px 10px; background: var(--night-2); border-color: #4c566a; color: #e5e9f0; }
.muscle-chips .chip small { color: #81a1c1; }
.muscle-chips .chip.hover { border-color: var(--muscle); color: #fff; }
.more-filters summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; width: fit-content; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 10px; }
select {
  width: 100%; padding: 8px 10px; font-size: 0.92rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink);
}
select.on { border-color: var(--frost); background: var(--frost-soft); }
.check { display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; font-size: 0.88rem; color: var(--muted); }

/* ---- 結果 ---- */
.ghost { background: transparent; color: var(--frost); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; }
.primary { display: inline-block; background: var(--frost); color: var(--frost-ink); border-radius: 10px; padding: 10px 18px; text-decoration: none; font-weight: 700; }
.icon-btn { background: var(--surface-2); color: var(--ink); border: 0; border-radius: 999px; width: 38px; height: 38px; flex: none; }
.bar { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 12px; gap: 8px; }
#count { margin: 0; font: 700 1.35rem/1.1 var(--display); letter-spacing: 0.01em; }

.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; width: 100%; height: 100%; text-align: left;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 0; overflow: hidden;
}
.card:hover { border-color: var(--frost); }
.card:hover .thumb > img { transform: scale(1.03); }
.card .thumb { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card .thumb > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.card .thumb.map { background: var(--night); display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 10px 24%; align-content: center; }
.card .thumb.map .fig-base { filter: brightness(1.25) contrast(0.9); mix-blend-mode: screen; opacity: 0.9; }
.card .thumb.map .fig-stack { cursor: inherit; }
.card .thumb .flag { position: absolute; right: 8px; bottom: 8px; font-size: 0.72rem; background: #eceff4; color: #2e3440; border-radius: 999px; padding: 1px 8px; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.card h3 { font-size: 1.02rem; margin: 0; line-height: 1.3; }
.card .en { font-size: 0.78rem; color: var(--muted); margin: -4px 0 0; }

.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.tags li { font-size: 0.76rem; background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 2px 8px; }
.tags li.m { background: var(--muscle); color: #fff; }

.more { display: block; margin: 22px auto; padding: 11px 26px; background: var(--surface); color: var(--frost); border: 1px solid var(--line); border-radius: 999px; font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---- 詳細 ---- */
dialog {
  width: min(820px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  border: 0; border-radius: 22px; padding: 0;
  background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}
dialog::backdrop { background: rgba(36, 41, 51, 0.72); }
dialog article { padding: 20px 22px 24px; }
.d-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.d-head h2 { margin: 0; font: 800 clamp(1.7rem, 4vw, 2.3rem)/1.05 var(--display); }
:lang(ja) .d-head h2, :lang(zh-CN) .d-head h2 { font-size: clamp(1.4rem, 3.4vw, 1.8rem); line-height: 1.25; }
.d-sub { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; }
.d-sub:empty { display: none; }
.d-top { display: grid; grid-template-columns: 1fr 170px; gap: 12px; margin: 16px 0; align-items: stretch; }
.d-top.noimg { grid-template-columns: 1fr; }
.d-top.noimg .d-map { max-width: 260px; width: 100%; margin: 0 auto; }
.d-images { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.d-images[hidden] { display: none; }
.d-images img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.d-map { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--night); border-radius: var(--radius); padding: 10px; align-content: center; }
.d-map .fig-base { filter: brightness(1.25) contrast(0.9); mix-blend-mode: screen; opacity: 0.9; }
@media (max-width: 560px) { .d-top { grid-template-columns: 1fr; } .d-map { max-width: 220px; width: 100%; margin: 0 auto; } }
.d-muscles { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 12px 0; }
.d-muscles dt { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.d-muscles dt::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--muscle); }
.d-muscles dt.sec::before { background: var(--muscle-2); }
.d-muscles dd { margin: 0; }
dialog h3 { margin: 18px 0 8px; font-size: 1.05rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
dialog ol { padding-left: 1.3em; margin: 0; }
dialog ol li { margin-bottom: 6px; }
/* 手順は本当に順番があるので、番号を丸で見せます。 */
.steps-list { list-style: none; padding: 0; counter-reset: s; }
.steps-list li { counter-increment: s; position: relative; padding-left: 40px; margin-bottom: 10px; min-height: 28px; }
.steps-list li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--night); color: #eceff4; font: 700 1rem/1 var(--display);
}
#d-howto[hidden], #d-orig[hidden] { display: none; }
#d-orig { margin-top: 8px; font-size: 0.9rem; color: var(--muted); }
#d-orig summary { cursor: pointer; }
.d-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.badge { font-size: 0.72rem; font-weight: 600; background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 2px 9px; }
.badge[hidden] { display: none; }

.guide { background: var(--frost-soft); border-radius: var(--radius); padding: 4px 16px 12px; margin-top: 14px; }
.guide[hidden] { display: none; }
.guide h4 { margin: 12px 0 4px; font-size: 0.92rem; }
.guide ul { padding-left: 1.2em; margin: 0; }
.guide ul li { margin-bottom: 4px; }
.guide-note { font-size: 0.88rem; border-left: 3px solid var(--frost); padding-left: 10px; color: var(--muted); }
.guide-note[hidden] { display: none; }
.credit { font-size: 0.8rem; color: var(--muted); margin-top: 14px; }

.foot { color: var(--muted); font-size: 0.86rem; padding-top: 28px; padding-bottom: 36px; }
.foot p { margin: 4px 0; }
.small { font-size: 0.8rem; }

/* スマホでは筋肉のボタンを横にスクロールする 1 行にして、使い方の 3 段を押し下げないようにします。 */
@media (max-width: 720px) {
  .muscle-chips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 6px; scrollbar-width: thin; }
  .muscle-chips .chip { flex: none; }
  .hero { padding-bottom: 30px; }
}
.hero-grid > * { min-width: 0; }
@media (max-width: 720px) {
  .eq-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .eq-chips button { flex: none; }
}
.muscle-chips .chip.zero { opacity: 0.45; }
||||||| a563efd
/* 「効かせるコツ」は説明の中でいちばん目立たせます */
.focus { background: var(--surface); border: 1px solid var(--frost); border-radius: 10px; padding: 2px 12px 10px; margin-top: 12px; }
.focus h4 { color: var(--frost); }
#d-guide-breath-box[hidden], .focus[hidden] { display: none; }
