/* 3D anatomy viewer pages (/ejeler/3d/, /lukmanlar/3d/). Loads after hub.css.
   Mothers' pages use terracotta, doctors' pages olive (body.doc). */
.ana-pg { --acc: var(--terracotta); --acc-d: var(--terracotta-d); --acc-tint: var(--tint-t); }
.ana-pg.doc { --acc: var(--olive-d); --acc-d: var(--olive-d); --acc-tint: var(--tint-o); }
.ana-pg .tag { background: var(--acc-tint); color: var(--acc-d); }

/* stage */
.v3-stage { min-width: 0; }
.v3-box {
  position: relative; aspect-ratio: 1 / 1; max-height: 64vh; width: 100%;
  border-radius: 24px; overflow: hidden; border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 50% 38%, var(--surface) 0%, var(--surface) 46%, var(--band) 100%);
  touch-action: none; isolation: isolate;
}
@supports not (aspect-ratio: 1 / 1) { .v3-box { height: 360px; } }
.v3-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; outline: none; }
.v3-canvas:active { cursor: grabbing; }
.v3-box:not(.live) { touch-action: auto; }

.v3-poster, .v3-loading, .v3-err {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px; text-align: center;
}
.v3-art { width: 46%; max-width: 210px; height: auto; }
.v3-art .pf { fill: var(--acc-tint); stroke: var(--acc); stroke-width: 2.2; stroke-linejoin: round; }
.v3-art .pl { stroke: var(--ink-soft); stroke-width: 2.2; fill: none; stroke-linecap: round; opacity: .55; }
.v3-art .pd, .v3-art .pd path { stroke: var(--marigold); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.v3-art .pk { fill: var(--acc); opacity: .5; }
.v3-art .pn { fill: var(--brown); }
.v3-open {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px;
  background: var(--acc); color: #fff; font-weight: 800; font-size: 17px; cursor: pointer;
  box-shadow: 0 8px 20px -10px rgba(46,32,24,.55); transition: transform .16s ease;
}
.v3-open:hover { transform: translateY(-1px); }
.v3-open svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
:root[data-theme="dark"] .v3-open { color: #1B1512; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .v3-open { color: #1B1512; } }
.v3-pnote { margin: 0; font-size: 13px; color: var(--ink-soft); max-width: 22rem; }

.v3-lt { font-weight: 800; font-size: 16px; }
.v3-bar { width: min(260px, 80%); height: 8px; border-radius: 9px; background: var(--line); overflow: hidden; }
.v3-bar i { display: block; height: 100%; width: 0; background: var(--acc); border-radius: 9px; transition: width .2s ease; }
.v3-lmb { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.v3-err p { margin: 0; max-width: 24rem; font-size: 15px; color: var(--ink-mid); }
.v3-retry {
  min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 800; cursor: pointer;
}

/* on-canvas controls */
.v3-tools { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px; display: flex; justify-content: center; pointer-events: none; }
.v3-views {
  pointer-events: auto; display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--tabs-bg); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); max-width: 100%;
}
.v3-views button {
  min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font-weight: 800; font-size: 13.5px; color: var(--ink-mid); white-space: nowrap;
}
.v3-views button[aria-pressed="true"] { background: var(--acc); color: #fff; }
:root[data-theme="dark"] .v3-views button[aria-pressed="true"] { color: #1B1512; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .v3-views button[aria-pressed="true"] { color: #1B1512; } }
.v3-close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--tabs-bg); color: var(--ink-mid);
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.v3-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.v3-hint { margin: 10px 2px 0; font-size: 13px; color: var(--ink-soft); }
.v3-attr { margin: 8px 2px 0; font-size: 11.5px; line-height: 1.45; color: var(--ink-soft); }
.v3-attr a { color: var(--acc-d); font-weight: 800; text-underline-offset: 2px; }

/* panel */
.v3-panel { margin-top: 18px; }
.v3-panel h1 { font-size: 25px; line-height: 1.15; margin: 10px 0 4px; letter-spacing: -.015em; }
.v3-sub { margin: 0 0 14px; color: var(--ink-mid); font-size: 15px; }
.v3-sel {
  border-radius: 20px; padding: 14px 16px; background: var(--band); min-height: 76px;
  transition: background-color .16s ease;
}
.v3-sel.on { background: var(--acc-tint); }
.v3-sel h3 { margin: 0 0 4px; font-size: 18px; line-height: 1.2; color: var(--ink); }
.v3-sel p { margin: 0; font-size: 15px; color: var(--ink-mid); }
.v3-sel .v3-pick { color: var(--ink-soft); font-size: 14.5px; }
.v3-parts { display: flex; flex-wrap: wrap; gap: 8px; }
.v3-part {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14.5px; line-height: 1.2;
  cursor: pointer; text-align: left;
}
.v3-part::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.v3-part[aria-pressed="true"] { border-color: var(--acc); background: var(--acc-tint); }
.v3-part[aria-pressed="true"]::before { background: var(--acc); }
.v3-reset {
  margin-top: 14px; min-height: 48px; padding: 0 18px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 800; font-size: 15px; cursor: pointer;
}
.v3-red { display: flex; gap: 10px; align-items: flex-start; }
.v3-red svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--red); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; margin-top: 1px; }
.ana-pg :focus-visible { outline-color: var(--acc); }

/* model list (unknown ?m=) */
.v3-lh { font-size: 25px; line-height: 1.15; margin: 10px 0 16px; letter-spacing: -.015em; }
.v3-list { display: flex; flex-direction: column; gap: 10px; }
.v3-li {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 20px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); min-height: 84px;
}
.v3-li-ic { flex: none; width: 60px; height: 60px; border-radius: 16px; background: var(--band); display: grid; place-items: center; }
.v3-li-ic .v3-art { width: 50px; }
.v3-li > div:nth-child(2) { flex: 1; min-width: 0; }
.v3-li b { display: block; font-size: 16.5px; line-height: 1.2; }
.v3-li span { display: block; font-size: 13.5px; color: var(--ink-mid); margin-top: 2px; }
.v3-li em { display: block; font-style: normal; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.v3-li .chev { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 340px) {
  .v3-views button { padding: 0 9px; font-size: 12.5px; }
}
@media (min-width: 760px) {
  .v3-box { aspect-ratio: 4 / 3; max-height: 70vh; }
  .v3-panel h1, .v3-lh { font-size: 32px; }
}
@media (min-width: 960px) {
  [data-page="anatomy"] .col { max-width: var(--wrap); }
  .v3 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 32px; align-items: start; }
  .v3-box { aspect-ratio: auto; height: min(72vh, 640px); max-height: none; }
  .v3-panel { margin-top: 0; position: sticky; top: 96px; }
  .v3-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .v3-list:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
}
@media (prefers-reduced-motion: reduce) {
  .v3-open, .v3-bar i, .v3-sel { transition: none; }
}

/* ===================== doctors' atlas model page (P15, .v3-atl) ======== */
.v3-atl { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "stage" "side"; gap: 14px; }
.atl-head { grid-area: head; }
.v3-atl .v3-stage { grid-area: stage; }
.atl-side { grid-area: side; margin-top: 0; }
.atl-head h1 { font-size: 25px; line-height: 1.15; margin: 10px 0 2px; letter-spacing: -.015em; }
.atl-la { margin: 0 0 4px; font-style: italic; color: var(--ink-mid); font-size: 15px; }
.atl-head .v3-sub { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.atl-kick { text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.atl-kick::before { content: ""; width: 7px; height: 7px; margin-right: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.atl-art { width: 34%; max-width: 150px; height: auto; fill: none; stroke: var(--acc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.v3-open:disabled { opacity: .45; cursor: default; transform: none; }
.atl-bad { color: var(--red); font-weight: 700; }
.atl-views { overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
.atl-views::-webkit-scrollbar { display: none; }
.atl-views button { flex: none; }
.atl-notice { display: flex; gap: 8px; align-items: flex-start; margin: 10px 2px 0; font-size: 13px; font-weight: 700; color: var(--ink-mid); }
.atl-notice svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--acc); stroke-width: 2; stroke-linecap: round; margin-top: 1px; }
.v3-atl .v3-attr a + a { margin-left: 2px; }

/* selection card */
.atl-sel { min-height: 0; }
.atl-seltop { display: flex; gap: 10px; align-items: center; }
.atl-seltop h3 { margin: 0; }
.atl-sel-la { margin: 4px 0 0; font-style: italic; color: var(--ink-mid); font-size: 15px; }
.atl-sel-la.none { font-style: normal; font-size: 13px; color: var(--ink-soft); }
.atl-sel-la98 { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); }
.atl-sel-la98 span { font-style: italic; }
.atl-sel-g { margin: 2px 0 8px; font-size: 12.5px; color: var(--ink-soft); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.v3-sel .atl-desc { margin: 0 0 6px; }
.atl-kidsbox { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.atl-kidsbox h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--acc-d); }
.atl-acts { margin-top: 12px; gap: 8px; }
.atl-acts > * { flex: 1 1 130px; min-height: 44px; font-size: 14px; padding: 0 12px; }

/* "In children" notes */
.atl-kids .sect { margin-top: 18px; }
.atl-kids > .small { margin: -4px 0 10px; }
.atl-note { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--acc); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.atl-note > p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); }
.v3-sel .atl-note { background: transparent; border: 0; border-left: 3px solid var(--acc); border-radius: 0; padding: 2px 0 2px 10px; }
.atl-note .atl-src { margin-top: 6px; font-size: 12.5px; color: var(--ink-soft); }
.atl-src a { color: var(--acc-d); font-weight: 700; text-underline-offset: 2px; overflow-wrap: anywhere; }
.atl-goto { min-height: 40px; padding: 0; color: var(--acc-d); font-size: 13.5px; text-align: left; }

/* parts list: a sheet under the canvas on phones, a panel on desktop */
.atl-parts { margin-top: 16px; }
.atl-parts-h { display: none; }
.atl-sheetbtn {
  width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 800; font-size: 16px; color: var(--ink); cursor: pointer;
}
.atl-sheetbtn .chev { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .16s ease; }
.atl-sheetbtn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.atl-parts[data-open="false"] .atl-sheet { display: none; }
.atl-sheet { margin-top: 10px; }
.atl-search { margin-bottom: 8px; }
.atl-search .inp { width: 100%; }
.atl-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.atl-count { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.atl-showall { min-height: 44px; font-size: 14px; }
.atl-found { margin: 6px 2px; font-size: 13px; color: var(--ink-soft); min-height: 1em; }
.atl-list {
  max-height: min(64vh, 560px); overflow-y: auto; overscroll-behavior: contain; position: relative;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
}
.atl-list > p, .atl-list > .v3-retry { margin: 14px; }
.atl-g + .atl-g { border-top: 1px solid var(--line); }
.atl-gh { display: flex; align-items: stretch; position: sticky; top: 0; z-index: 1; background: var(--band); }
.atl-gbtn {
  flex: 1; min-width: 0; min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px;
  border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink); font-weight: 800; font-size: 14.5px;
}
.atl-gbtn .chev { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--ink-soft); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .16s ease; }
.atl-gbtn[aria-expanded="true"] .chev { transform: rotate(90deg); }
.atl-gname { flex: 1; min-width: 0; }
.atl-gcount { flex: none; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.atl-rows { list-style: none; margin: 0; padding: 2px 0; }
.atl-row { display: flex; align-items: stretch; }
.atl-row[hidden] { display: none; }
.atl-pick {
  flex: 1; min-width: 0; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px;
  border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink); border-radius: 12px;
}
.atl-pick[aria-pressed="true"] { background: var(--acc-tint); }
.atl-pick:hover { background: var(--band); }
.atl-pick[aria-pressed="true"]:hover { background: var(--acc-tint); }
.atl-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.atl-txt { min-width: 0; display: flex; flex-direction: column; }
.atl-txt b { font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.atl-txt small { font-size: 12.5px; font-style: italic; color: var(--ink-soft); line-height: 1.25; }
.atl-row.off .atl-txt, .atl-row.off .atl-dot { opacity: .45; }
.atl-eye {
  flex: none; width: 48px; min-height: 48px; display: grid; place-items: center; border: 0; background: none;
  cursor: pointer; color: var(--ink-mid); border-radius: 12px; padding: 0;
}
.atl-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.atl-eye .off, .atl-eye[aria-pressed="false"] .on { display: none; }
.atl-eye[aria-pressed="false"] .off { display: block; }
.atl-eye[aria-pressed="false"] { color: var(--ink-soft); }
.atl-eye:hover { background: var(--band); }
.atl-tail { margin-top: 16px; }

@media (min-width: 760px) {
  .atl-head h1 { font-size: 32px; }
}
@media (min-width: 960px) {
  .v3-atl { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "stage head" "stage side"; column-gap: 32px; row-gap: 6px; align-items: start; }
  .v3-atl .v3-stage { position: sticky; top: 96px; }
  .atl-side { position: static; }
  .atl-sheetbtn { display: none; }
  .atl-parts[data-open="false"] .atl-sheet { display: block; }
  .atl-parts .atl-sheet { margin-top: 0; }
  .atl-parts-h { display: block; margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .atl-sheetbtn .chev, .atl-gbtn .chev { transition: none; }
}
