/* Page-local artwork and atlas layout. */
.anatomy-page { --muscle-main: #e33124; --muscle-secondary: #2584d4; --muscle-support: #8b50d0; --muscle-rest: #8e9aa3; }
.anatomy-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.anatomy-nav a { padding: 8px 16px; min-height: 40px; border-radius: 999px; border: 1px solid #e0d1be; text-decoration: none; font-size: 12px; color: #7a6656; }
.anatomy-nav a[aria-current] { background: #b04d27; border-color: #b04d27; color: white; }
.anatomy-heading {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  align-items: center;
  min-height: 284px;
  padding: 24px 34px;
  overflow: hidden;
  border: 1px solid #e5d8c6;
  border-radius: 24px;
  background: #f6eee2;
  gap: 18px;
}
.anatomy-heading::before { display: none; }
.anatomy-heading h1 { font-size: clamp(32px, 3.6vw, 48px); letter-spacing: -.04em; margin: 10px 0 14px; }
.anatomy-heading .eyebrow { font-size: 10px; letter-spacing: .2em; }
.anatomy-heading .hero-description { max-width: 25em; line-height: 1.85; font-size: 14px; }
.hero-art { width: 100%; height: 270px; object-fit: contain; mix-blend-mode: multiply; }
.hero-index { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; font-size: 11px; color: #7a6656; }
.hero-index span { display: flex; align-items: center; gap: 6px; }
.hero-index b { color: #8a3c1e; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.atlas-intro { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 2px 14px; }
.atlas-intro h2 { font-size: 20px; margin: 0; }
.atlas-intro p { margin: 0; font-size: 12px; color: #7a6656; }
.atlas { grid-template-columns: 244px minmax(0, 1fr) 232px; gap: 20px; }
.atlas-sidebar { padding: 16px 12px; }
.exercise-list { max-height: 660px; gap: 8px; }
.exercise { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: center; padding: 5px; gap: 9px; box-shadow: none; border-radius: 12px; }
.exercise-thumb { width: 78px; height: 78px; object-fit: cover; border-radius: 8px; background: #ece7df; }
.exercise-copy { display: block; min-width: 0; padding-right: 3px; }
.exercise strong { font-size: 12px; line-height: 1.5; }
.exercise small { font-size: 10px; line-height: 1.45; margin-top: 3px; }
.exercise .exercise-kind { font-size: 8px; letter-spacing: .06em; padding: 1px 5px; margin-bottom: 4px; }
.exercise[aria-pressed="true"] { box-shadow: inset 3px 0 #b04d27; }
.stage {
  border-color: #dbd6cc;
  background: radial-gradient(ellipse at 50% 30%, #faf8f2 0%, #eee9df 58%, #d9d4c9 100%);
  box-shadow: inset 0 0 50px rgba(92,70,46,.06);
}
.stage::before { content: ""; pointer-events: none; position: absolute; inset: 0; background-image: linear-gradient(rgba(117,98,78,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(117,98,78,.055) 1px, transparent 1px); background-size: 48px 48px; z-index: 0; mask-image: linear-gradient(transparent, #000); }
.stage canvas { position: relative; }
.load-screen { background: #eee9df; padding: 0; }
.model-cover { position: absolute; width: min(100%, 520px); left: 50%; top: 46%; transform: translate(-50%,-50%); opacity: .72; }
.model-cover[hidden] { display: none; }
.load-copy { position: absolute; inset: auto 0 0; display: grid; justify-items: center; gap: 10px; padding: 48px 16px 32px; background: linear-gradient(transparent, #eee9df 32%); }
.load-copy #open-model { background: #b04d27; color: #fff; border: 0; padding: 12px 24px; min-height: 46px; font-size: 14px !important; box-shadow: 0 6px 20px #b04d2733; }
.load-copy [hidden] { display: none; }
.load-screen p { color: #34261c; }
.load-screen small { color: #7a6656; }
.load-screen .view-button { color: #8a3c1e; background: #fffaf2; border-color: #d8c5ae; }
.model-label strong { color: #34261c; text-shadow: none; }
.model-label > span { color: #6f6255; text-shadow: none; }
.model-label .model-role { box-shadow: 0 3px 10px rgba(64,45,28,.08); }
.view-presets { background: rgba(255,250,242,.9); border-color: #d8cfc1; box-shadow: 0 6px 20px rgba(64,45,28,.10); }
.view-button { color: #625345; }
.view-button:hover:not([aria-pressed="true"]) { color: #8a3c1e; background: #f7e2cf; }
.muscle-specimen { margin: -4px -4px 14px; padding: 0; position: relative; }
.muscle-specimen img { width: 100%; height: 150px; object-fit: contain; border-radius: 10px; background: #ece7df; }
.muscle-specimen figcaption { color: #7a6656; font-size: 9px; letter-spacing: .08em; margin-top: 5px; text-align: right; }
.movement-story { margin: 22px 0; padding-bottom: 24px; border-bottom: 1px solid #ead9c4; }
.movement-story-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.movement-story-heading h3 { font-size: 16px; margin: 0; }
.movement-story-heading p { color: #7a6656; font-size: 11px; margin: 0; }
.movement-frames { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.art-phase { padding: 0; text-align: left; background: #fffaf2; color: #34261c; border: 1px solid #e2d7c7; border-radius: 14px; overflow: hidden; }
.illustration-window { display: block; overflow: hidden; aspect-ratio: var(--art-ratio, 4 / 3); background: #ece7df; }
.illustration-window img { display: block; width: calc(100% * var(--art-columns, 1)); max-width: none; height: 100%; object-fit: fill; transform: translateX(var(--art-shift, 0%)); }
.art-phase-caption { display: flex; align-items: start; gap: 10px; padding: 12px; font-size: 12px; line-height: 1.55; }
.art-phase-caption b { color: #b04d27; font-size: 10px; line-height: 1.85; font-variant-numeric: tabular-nums; }
.art-phase[aria-pressed="true"], .art-phase:hover { border-color: #b04d27; box-shadow: 0 0 0 1px #b04d27; }
.anatomy-studies { margin-top: 36px; }
.studies-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.studies-heading h2 { font-size: 23px; margin: 0; }
.studies-heading p { color: #7a6656; font-size: 12px; margin: 0; }
.anatomy-plates { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.anatomy-plate { margin: 0; border: 1px solid #e2d7c7; border-radius: 20px; background: #fffaf2; overflow: hidden; }
.plate-image { position: relative; background: #ece7df; }
.plate-image img { width: 100%; height: 340px; object-fit: contain; }
.plate-number { position: absolute; top: 16px; left: 18px; color: #8c7764; font-size: 11px; letter-spacing: .15em; }
.anatomy-plate figcaption { padding: 20px; }
.anatomy-plate h3 { margin: 0 0 8px; font-size: 19px; }
.anatomy-plate p { margin: 0 0 16px; font-size: 12px; line-height: 1.9; color: #7a6656; }
.anatomy-plate button { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid #dcc5ac; color: #8a3c1e; background: #f7e2cf; font-size: 12px; font-weight: 600; }
.anatomy-plate button:hover { border-color: #b04d27; }
.art-credit { color: #7a6656; font-size: 11px; line-height: 1.8; margin: 14px 2px 0; }
@media (max-width: 1200px) {
  .atlas { grid-template-columns: 220px minmax(0,1fr); }
  .atlas-detail { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .atlas-detail > .layer-controls { grid-column: 1 / -1; }
  .detail-panel { display: flow-root; }
  .muscle-specimen { float: right; width: 130px; margin: 0 0 10px 12px; }
  .detail-panel > h2 { clear: both; }
  .stage { height: 570px; }
}
@media (max-width: 800px) {
  .anatomy-heading { padding: 20px 24px; grid-template-columns: 1fr 1fr; min-height: 230px; }
  .hero-art { height: 210px; }
  .hero-index { gap: 8px 14px; margin-top: 14px; }
  .studies-heading { display: block; }
  .studies-heading p { margin-top: 6px; }
  .anatomy-plates { gap: 12px; }
  .plate-image img { height: 260px; }
  .anatomy-plate figcaption { padding: 14px; }
}
@media (max-width: 640px) {
  .anatomy-heading { grid-template-columns: 1fr; padding: 22px; gap: 8px; border-radius: 20px; }
  .anatomy-heading h1 { font-size: 34px; }
  .anatomy-heading .hero-description { font-size: 13px; }
  .hero-art { height: 190px; }
  .hero-index { margin-top: 14px; }
  .atlas-intro { align-items: start; flex-direction: column; gap: 3px; margin-top: 22px; }
  .atlas-intro h2 { font-size: 18px; }
  .atlas-sidebar { padding: 12px; }
  .exercise-list { grid-template-columns: repeat(3,minmax(0,1fr)); max-height: 302px; padding-right: 3px; gap: 8px; }
  .exercise { display: block; padding: 4px 4px 8px; text-align: left; }
  .exercise-thumb { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
  .exercise-copy { padding: 7px 3px 0; }
  .exercise strong { font-size: 11px; }
  .exercise small { display: none; }
  .exercise .exercise-kind { font-size: 7px; padding: 1px 4px; margin-bottom: 3px; }
  .stage { height: 460px; }
  .atlas-detail { display: block; }
  .muscle-specimen { width: 140px; }
  .movement-frames { grid-template-columns: 1fr; gap: 8px; }
  .art-phase { display: grid; grid-template-columns: 46% minmax(0,1fr); align-items: center; }
  .art-phase-caption { display: block; padding: 12px; font-size: 12px; }
  .art-phase-caption b { display: block; margin-bottom: 3px; }
  .movement-story-heading { display: block; }
  .movement-story-heading p { margin-top: 4px; }
  .anatomy-plates { grid-template-columns: 1fr; }
  .anatomy-plate { display: grid; grid-template-columns: 44% minmax(0,1fr); border-radius: 16px; }
  .plate-image img { height: 250px; }
  .anatomy-plate figcaption { align-self: center; padding: 16px; }
  .anatomy-plate h3 { font-size: 18px; }
  .anatomy-plate p { font-size: 11px; }
  .studies-heading h2 { font-size: 21px; }
}

.premium-movement { margin: 22px 0 26px; border: 1px solid #e2d7c7; border-radius: 18px; overflow: hidden; background: #f6eee2; }
.premium-movement[hidden] { display: none; }
.premium-movement .illustration-window { max-width: 640px; margin: 0 auto; }
.premium-movement figcaption { padding: 10px 16px; font-size: 11px; color: #7a6656; background: #fffaf2; }
