:root {
  --black: #08090a;
  --ink: #0d0f11;
  --panel: #121519;
  --panel-2: #181c21;
  --gold: #d5a83f;
  --gold-bright: #f2ca6a;
  --red: #ee6363;
  --green: #6ed28c;
  --white: #f5f3ed;
  --muted: #a8a9a5;
  --line: rgba(255,255,255,.12);
  --line-gold: rgba(213,168,63,.42);
  --display: "Barlow Condensed", Impact, sans-serif;
  --body: "Inter", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--black); color: var(--white); font: 16px/1.6 var(--body); }
body.detail-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; }
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: -60px; left: 16px; padding: 10px 16px; background: var(--gold); color: #000; font-weight: 800; }
.skip-link:focus { top: 12px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 3px; }

.atlas-header {
  position: sticky; top: 0; z-index: 40;
  min-height: 78px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 30px;
  padding: 12px max(22px, calc((100vw - 1540px)/2));
  background: rgba(8,9,10,.96); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: max-content; }
.brand-mark { width: 32px; color: var(--gold-bright); }
.brand-mark svg { fill: none; stroke: currentColor; stroke-width: 1.5; }
.brand strong, .brand small { display: block; text-transform: uppercase; line-height: 1; }
.brand strong { color: var(--gold-bright); font: 700 1.35rem var(--display); letter-spacing: .05em; }
.brand small { margin-top: 5px; font: 600 .78rem var(--display); letter-spacing: .14em; }
.header-title { text-align: center; font-family: var(--display); text-transform: uppercase; line-height: 1.1; }
.header-title span { display: block; color: #75797f; font-size: .73rem; letter-spacing: .14em; }
.header-title b { color: #d6d6d2; letter-spacing: .1em; }
.home-link { padding: 10px 15px; border: 1px solid var(--line-gold); color: var(--gold-bright); font: 700 .88rem var(--display); letter-spacing: .08em; text-transform: uppercase; }

.atlas-intro {
  display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 70px;
  padding: 72px max(22px, calc((100vw - 1540px)/2)) 55px;
  background: radial-gradient(circle at 22% 0, rgba(213,168,63,.13), transparent 35%), #090a0b;
}
.eyebrow { margin: 0 0 8px; color: var(--gold-bright); font: 700 .9rem var(--display); letter-spacing: .15em; text-transform: uppercase; }
h1,h2,h3 { margin: 0; font-family: var(--display); line-height: .95; text-transform: uppercase; }
h1 { font-size: clamp(3.8rem, 6.8vw, 7.2rem); letter-spacing: -.025em; }
h1 span { color: var(--gold); }
h2 { font-size: clamp(2.1rem, 3.4vw, 3.8rem); }
h3 { font-size: 1.28rem; letter-spacing: .025em; }
.atlas-intro > p { max-width: 650px; margin: 0 0 10px; color: #c2c2be; font-size: 1.05rem; }

.atlas-tools {
  position: sticky; top: 78px; z-index: 35;
  display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center;
  padding: 15px max(22px, calc((100vw - 1540px)/2));
  border-block: 1px solid var(--line); background: rgba(13,15,17,.97); backdrop-filter: blur(18px);
}
.search-box { min-height: 52px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 0 15px; border: 1px solid var(--line-gold); background: #08090a; }
.search-icon { color: var(--gold); font-size: 1.7rem; line-height: 1; transform: rotate(-18deg); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--white); font-size: 1rem; }
.search-box input::placeholder { color: #777a7e; }
kbd { padding: 2px 8px; border: 1px solid #45484d; border-radius: 3px; color: #8d9094; font: .75rem var(--body); }
.result-count { display: flex; align-items: baseline; gap: 7px; min-width: 132px; }
.result-count strong { color: var(--gold-bright); font: 700 1.75rem var(--display); }
.result-count span { color: #8b8e91; font-size: .78rem; }
.clear-button { min-height: 42px; padding: 0 14px; border: 1px solid var(--line); background: transparent; color: #a9aaa7; cursor: pointer; font: 700 .8rem var(--display); letter-spacing: .08em; text-transform: uppercase; }
.clear-button:hover { border-color: var(--gold); color: var(--gold-bright); }

.atlas-workspace {
  display: grid; grid-template-columns: 245px minmax(420px,1fr) minmax(350px,470px);
  max-width: 1600px; margin: 0 auto; min-height: 780px;
}
.region-panel, .detail-panel { background: #0b0d0f; }
.region-panel { position: sticky; top: 147px; height: calc(100vh - 147px); overflow: auto; border-right: 1px solid var(--line); }
.panel-heading { display: flex; justify-content: space-between; gap: 10px; padding: 22px; border-bottom: 1px solid var(--line); font: 700 .85rem var(--display); letter-spacing: .1em; text-transform: uppercase; }
.panel-heading small { color: #75787c; }
#region-list { padding: 10px 0; }
.region-button { width: 100%; min-height: 49px; display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px; padding: 0 22px; border: 0; border-left: 3px solid transparent; background: transparent; color: #aeb0ad; text-align: left; cursor: pointer; }
.region-button:hover { background: rgba(255,255,255,.035); color: white; }
.region-button.active { border-left-color: var(--gold); background: rgba(213,168,63,.08); color: var(--gold-bright); }
.region-button .region-index { color: #5c6064; font: 600 .75rem var(--display); }
.region-button .region-name { font: 600 .93rem var(--display); letter-spacing: .04em; text-transform: uppercase; }
.region-button .region-count { color: #74777a; font-size: .75rem; }
.principle-card { margin: 18px; padding: 20px; border: 1px solid var(--line-gold); background: linear-gradient(145deg, rgba(213,168,63,.09), transparent); }
.principle-number { display: block; color: var(--gold); font: 700 1rem var(--display); }
.principle-card strong { display: block; margin-top: 10px; font: 700 1.25rem var(--display); text-transform: uppercase; }
.principle-card p { margin-bottom: 0; color: #898c8f; font-size: .8rem; }

.muscle-browser { min-width: 0; padding: 28px; background: #0f1113; }
.browser-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.browser-head h2 { font-size: 2.4rem; }
.sort-label { display: grid; gap: 5px; color: #7d8084; font: 600 .72rem var(--display); letter-spacing: .1em; text-transform: uppercase; }
.sort-label select { min-height: 40px; border: 1px solid var(--line); background: #090a0b; color: #deddd8; padding: 0 32px 0 11px; }
.muscle-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.muscle-card { position: relative; min-height: 145px; display: flex; flex-direction: column; align-items: flex-start; padding: 18px; border: 1px solid var(--line); background: linear-gradient(145deg,#171a1e,#101214); color: inherit; text-align: left; cursor: pointer; transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.muscle-card:hover { transform: translateY(-2px); border-color: rgba(213,168,63,.5); }
.muscle-card.selected { border-color: var(--gold); background: linear-gradient(145deg,rgba(213,168,63,.13),#111315); }
.muscle-card .card-area { color: var(--gold); font: 700 .74rem var(--display); letter-spacing: .1em; text-transform: uppercase; }
.muscle-card strong { margin: 8px 0; font: 700 1.36rem/1 var(--display); text-transform: uppercase; }
.muscle-card p { margin: 0; color: #85888b; font-size: .78rem; line-height: 1.45; }
.muscle-card .card-arrow { position: absolute; right: 14px; bottom: 11px; color: #575a5e; font-size: 1.2rem; }
.empty-state { padding: 80px 20px; border: 1px dashed var(--line); color: #8e9194; text-align: center; }
.empty-state b { color: #dddcd7; font: 700 1.7rem var(--display); text-transform: uppercase; }

.detail-panel { position: sticky; top: 147px; height: calc(100vh - 147px); overflow: auto; border-left: 1px solid var(--line); }
.detail-empty { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 42px; }
.detail-empty h2 { margin: 8px 0 18px; }
.detail-empty > p:not(.eyebrow) { color: #85888b; }
.connection-mark { position: relative; width: 115px; height: 115px; margin-bottom: 35px; border: 1px solid var(--line-gold); border-radius: 50%; }
.connection-mark::before,.connection-mark::after { content:""; position:absolute; background:var(--gold); }
.connection-mark::before { width: 1px; height: 70px; left: 56px; top: 21px; transform: rotate(45deg); }
.connection-mark::after { width: 70px; height: 1px; left: 21px; top: 56px; transform: rotate(45deg); }
.connection-mark i { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--gold-bright); box-shadow: 0 0 13px rgba(242,202,106,.6); }
.connection-mark i:nth-child(1){left:17px;top:17px}.connection-mark i:nth-child(2){right:17px;top:17px}.connection-mark i:nth-child(3){left:52px;top:52px}.connection-mark i:nth-child(4){left:17px;bottom:17px}.connection-mark i:nth-child(5){right:17px;bottom:17px}
.detail-content { position: relative; padding: 32px; }
.close-detail { display: none; position: absolute; right: 17px; top: 15px; width: 42px; height: 42px; border: 1px solid var(--line); background: #0a0b0c; font-size: 1.7rem; cursor: pointer; }
.detail-meta { display: flex; gap: 8px; margin-bottom: 15px; }
.detail-meta span { padding: 4px 8px; border: 1px solid var(--line); color: #9a9da0; font: 600 .72rem var(--display); letter-spacing: .08em; text-transform: uppercase; }
.detail-content > h2 { color: var(--gold-bright); font-size: clamp(2.5rem,4vw,4.6rem); overflow-wrap: anywhere; }
.anatomy-block { margin: 27px 0; border-block: 1px solid var(--line); }
.anatomy-row { padding: 17px 0; }
.anatomy-row + .anatomy-row { border-top: 1px solid var(--line); }
.anatomy-key { display: flex; align-items: center; gap: 8px; color: #8d9093; font: 700 .75rem var(--display); letter-spacing: .12em; text-transform: uppercase; }
.anatomy-key i, .guide-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.origin i,.guide-dot.red { background: var(--red); box-shadow: 0 0 11px rgba(238,99,99,.45); }
.insertion i,.guide-dot.green { background: var(--green); box-shadow: 0 0 11px rgba(110,210,140,.4); }
.anatomy-row p { margin: 8px 0 0; color: #deddd8; font-size: .91rem; line-height: 1.5; }
.detail-section { margin-top: 27px; }
.detail-section h3 { margin-bottom: 11px; color: #8d9093; font-size: .88rem; letter-spacing: .12em; }
.detail-section > p { margin: 0; color: #c0c1bd; font-size: .92rem; }
.action-list,.connection-list { display: flex; flex-wrap: wrap; gap: 7px; }
.action-list span { padding: 6px 9px; border: 1px solid var(--line-gold); color: var(--gold-bright); background: rgba(213,168,63,.06); font-size: .78rem; }
.insight { padding: 18px; border-left: 2px solid var(--gold); background: rgba(213,168,63,.06); }
.insight-label { display: block; margin-bottom: 7px; color: var(--gold-bright); font: 700 .78rem var(--display); letter-spacing: .1em; text-transform: uppercase; }
.connection-list button { padding: 7px 10px; border: 1px solid var(--line); background: #111419; color: #d4d4cf; cursor: pointer; font-size: .78rem; }
.connection-list button:hover { border-color: var(--gold); color: var(--gold-bright); }

.atlas-guide,.education-note { padding: 90px max(22px,calc((100vw - 1280px)/2)); }
.atlas-guide { background: #ece8de; color: #121212; }
.atlas-guide > div:first-child { max-width: 650px; margin-bottom: 45px; }
.guide-grid { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid #bcb5a6; }
.guide-grid article { padding: 27px 27px 0 0; }
.guide-grid article + article { padding-left: 27px; border-left: 1px solid #bcb5a6; }
.guide-grid h3 { margin: 18px 0 8px; }
.guide-grid p { margin: 0; color: #5e5a52; font-size: .9rem; }
.guide-dot.gold { background: var(--gold); }
.guide-dot.white { background: white; border: 1px solid #aaa; }
.education-note { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; background: #0b0d0f; }
.education-note > div:last-child { padding-left: 35px; border-left: 1px solid var(--line-gold); color: #a5a7a5; }

.atlas-footer { display: grid; grid-template-columns: 1fr 1.5fr; gap: 35px 80px; padding: 55px max(22px,calc((100vw - 1280px)/2)) 30px; border-top: 1px solid var(--line); background: #060708; }
.atlas-footer > div:first-child strong,.atlas-footer > div:first-child span { display: block; text-transform: uppercase; }
.atlas-footer > div:first-child strong { color: var(--gold-bright); font: 700 1.5rem var(--display); }
.atlas-footer > div:first-child span { color: #8b8e91; font: 600 .86rem var(--display); letter-spacing: .12em; }
.source-note { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 18px; }
.source-note span { width: 100%; color: #73767a; text-align: right; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; }
.source-note a { color: #aaa; font-size: .75rem; text-decoration: underline; }
.atlas-footer small { grid-column: 1/-1; padding-top: 22px; border-top: 1px solid var(--line); color: #666a6e; }
.mobile-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }

@media (max-width: 1180px) {
  .atlas-workspace { grid-template-columns: 220px 1fr; }
  .detail-panel { position: fixed; z-index: 80; inset: 0 0 0 auto; width: min(480px,92vw); height: 100vh; transform: translateX(102%); transition: transform .22s ease; box-shadow: -30px 0 70px rgba(0,0,0,.5); }
  .detail-panel.open { transform: translateX(0); }
  .close-detail { display: grid; place-items: center; }
}
@media (max-width: 820px) {
  .atlas-header { grid-template-columns: 1fr auto; }
  .header-title { display: none; }
  .atlas-intro { grid-template-columns: 1fr; gap: 25px; padding-top: 55px; }
  .atlas-tools { top: 73px; grid-template-columns: 1fr auto; }
  .result-count { display: none; }
  .atlas-workspace { grid-template-columns: 1fr; }
  .region-panel { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  #region-list { display: flex; overflow-x: auto; padding: 10px; scrollbar-width: thin; }
  .region-button { min-width: max-content; width: auto; grid-template-columns: 1fr auto; padding: 0 14px; border-left: 0; border-bottom: 2px solid transparent; }
  .region-button.active { border-bottom-color: var(--gold); }
  .region-index { display: none; }
  .principle-card,.panel-heading { display: none; }
  .muscle-browser { padding: 22px; }
  .guide-grid { grid-template-columns: repeat(2,1fr); }
  .guide-grid article:nth-child(3) { border-left: 0; border-top: 1px solid #bcb5a6; padding-left: 0; }
  .guide-grid article:nth-child(4) { border-top: 1px solid #bcb5a6; }
  .education-note { grid-template-columns: 1fr; gap: 30px; }
  .education-note > div:last-child { padding-left: 22px; }
}
@media (max-width: 560px) {
  .atlas-header { min-height: 68px; padding-block: 10px; }
  .brand-mark { width: 28px; }
  .brand strong { font-size: 1.12rem; }
  .brand small { font-size: .68rem; }
  .home-link { padding: 8px 10px; font-size: .72rem; }
  .atlas-intro { padding-bottom: 38px; }
  h1 { font-size: clamp(3.2rem,15vw,5rem); }
  .atlas-tools { top: 68px; grid-template-columns: 1fr; }
  .clear-button { display: none; }
  .search-box { min-height: 48px; }
  .muscle-grid { grid-template-columns: 1fr; }
  .browser-head { align-items: start; }
  .browser-head h2 { font-size: 1.9rem; }
  .sort-label { max-width: 125px; }
  .muscle-card { min-height: 125px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-grid article + article,.guide-grid article:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid #bcb5a6; }
  .atlas-footer { grid-template-columns: 1fr; }
  .source-note { justify-content: flex-start; }
  .source-note span { text-align: left; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
