/* Карта тела на главной: фигура в центре, кольцо на зоне конусом раскрывается в линзу справа,
   пилюля зоны слева, товары зоны под линзой. Цвета и шрифты – из tokens.css */
.bodymap {
  --bm-paper-2: #F6EEDD;
  --bm-frame: #D9CDB4;
  --bm-line: #A79F8C;
  --bm-card: #FFFDF8;
  --bm-sage-f: #E4ECE2; --bm-sage-b: #9DB5A3;
  --bm-coral-f: #F9E2D9; --bm-coral-b: #E2A28C; --bm-coral-t: #6E3121;
  --bm-cream-f: #F3ECDD; --bm-cream-b: #CFC3A9; --bm-cream-t: #4A4231;
  --bm-shadow: 0 12px 32px rgba(28, 50, 35, .14);
}
.bm-sheet { position: relative; margin: 0; padding: clamp(18px, 3.5vw, 44px); border: 1px solid var(--bm-frame); border-radius: 22px; }
.bm-sheet::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--bm-frame); border-radius: 16px; pointer-events: none; opacity: .7; }
.bm-title { margin: 0; text-align: center; text-wrap: balance; font-family: var(--font-display); font-weight: 400; color: var(--forest); }
.bm-title small { display: block; font-size: clamp(15px, 2vw, 22px); line-height: 1.1; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.bm-title b { display: block; font-weight: 400; font-size: clamp(36px, 6vw, 66px); line-height: 1; letter-spacing: .04em; text-transform: uppercase; }
.bm-lead { max-width: 620px; margin: 12px auto 0; text-align: center; font-size: 15px; color: var(--ink-2); }
.bm-lead a { color: var(--gold-ink); font-weight: 600; white-space: nowrap; }
.bm-tap { display: none; }
@media (hover: none) { .bm-hov { display: none; } .bm-tap { display: inline; } }

.bm-seg { display: inline-flex; padding: 4px; border: 1px solid var(--bm-frame); border-radius: var(--radius-pill); background: var(--bm-card); }
.bm-seg button { min-height: 40px; padding: 9px 18px; border: 0; border-radius: var(--radius-pill); background: none; font: 600 13px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); cursor: pointer; }
.bm-seg button[aria-pressed="true"] { background: var(--forest); color: var(--on-dark); }
.bodymap button:focus-visible, .bodymap a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.bm-pill { display: inline-flex; align-items: center; padding: 5px 14px; border: 1px solid var(--bm-sage-b); border-radius: var(--radius-pill); background: var(--bm-sage-f); color: var(--forest); font: 600 12.5px/1.2 var(--font-body); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.bm-pill.coral { background: var(--bm-coral-f); border-color: var(--bm-coral-b); color: var(--bm-coral-t); }
.bm-pill.cream { background: var(--bm-cream-f); border-color: var(--bm-cream-b); color: var(--bm-cream-t); }

/* Сцена: подписи | фигура | линза */
.bm-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 22px; }
.bm-figure-col { grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.bm-figure { position: relative; width: 100%; max-width: 100%; aspect-ratio: 2 / 3; cursor: crosshair; user-select: none; touch-action: manipulation; }
.bm-body { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .35s; }
.bm-body[hidden] { display: block !important; opacity: 0; pointer-events: none; }
.bm-side { grid-column: 3; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; padding-top: 64px; }
.bm-over { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.bm-over line, .bm-over path { fill: none; stroke: var(--bm-line); stroke-width: 1; }
.bm-over circle { fill: var(--bm-card); stroke: var(--bm-line); }

/* Точки зон – маленькие; зона включается по ближайшей точке, целиться не нужно */
.bm-spot { position: absolute; z-index: 2; width: 20px; height: 20px; margin: -10px 0 0 -10px; padding: 0; border: 0; background: none; cursor: pointer; }
.bm-spot::before { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: radial-gradient(circle, #FBEBC2 0%, #E3C47E 30%, rgba(190, 150, 70, .55) 55%, rgba(190, 150, 70, 0) 72%); box-shadow: 0 0 6px 1px rgba(214, 178, 98, .55); transform: scale(.12); opacity: .25; animation: bm-glow 2.8s ease-in-out infinite; animation-delay: var(--d, 0s); }
/* мягкий пульс – чтобы точки находили глазом, не делая их крупнее */
.bm-spot::after { content: none; }
/* точка почти исчезает до искры и разгорается мягким золотым светом – без белой заливки */
@keyframes bm-glow { 0%, 100% { transform: scale(.12); opacity: .25; box-shadow: 0 0 2px 0 rgba(214, 178, 98, .3); } 50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 12px 3px rgba(214, 178, 98, .6); } }
.bm-spot.on::before { animation: none; transform: scale(1.25); opacity: 1; box-shadow: 0 0 14px 4px rgba(214, 178, 98, .7); }
.bm-spot[hidden] { display: none; }
.bm-ring { position: absolute; z-index: 3; width: 64px; height: 64px; margin: -32px 0 0 -32px; border: 1.5px solid var(--gold); border-radius: 50%; background: radial-gradient(circle, rgba(190, 150, 70, .10), transparent 70%); box-shadow: 0 0 0 4px rgba(255, 250, 240, .7), 0 0 0 5px rgba(190, 150, 70, .35); opacity: 0; transform: scale(.6); transition: opacity .25s, transform .3s, left .3s, top .3s; pointer-events: none; }
.bm-ring.show { opacity: 1; transform: none; }
/* зона закреплена щелчком – кольцо плотнее */
.bm-stage.pinned .bm-ring { border-width: 2.5px; box-shadow: 0 0 0 4px rgba(255, 250, 240, .75), 0 0 14px 2px rgba(190, 150, 70, .45); }
/* подсказка у курсора: «Нажмите, чтобы закрепить зону» */
.bm-hint { position: absolute; z-index: 7; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--forest); color: var(--on-dark); font: 600 12px/1.2 var(--font-body); white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, calc(-100% - 14px)); transition: opacity .25s; }
.bm-hint.show { opacity: .95; }
.bm-tag { position: absolute; z-index: 6; width: 200px; text-align: right; opacity: 0; transition: opacity .25s, top .3s; pointer-events: none; }
.bm-tag.show { opacity: 1; }
.bm-tag p { margin: 6px 0 0; font-size: 13px; line-height: 1.35; color: var(--ink-2); }

.bm-lens { position: relative; width: min(100%, 300px); max-width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--bm-paper-2); box-shadow: var(--bm-shadow); }
.bm-lens::before { content: ""; position: absolute; inset: -9px; border: 1px solid var(--bm-frame); border-radius: 50%; }
.bm-lens::after { content: ""; position: absolute; inset: 0; border: 1.5px solid var(--bm-frame); border-radius: 50%; box-shadow: inset 0 0 0 5px rgba(255, 250, 240, .55), inset 0 0 30px rgba(28, 50, 35, .12); }
.bm-lens img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; opacity: 0; transform: scale(.94); transition: opacity .4s, transform .6s var(--ease); }
.bm-lens img.on { opacity: 1; transform: none; }
.bm-caption { text-align: center; }
.bm-caption .bm-cap-title { margin: 0; font: 600 14px/1.25 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--forest); }
.bm-caption p { max-width: 340px; margin: 4px auto 0; font-size: 14px; color: var(--ink-2); }
.bm-products { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; width: 100%; max-width: 380px; }
.bm-prod { display: flex; gap: 10px; align-items: flex-start; min-width: 0; padding: 10px 12px; border: 1px solid var(--bm-frame); border-radius: 14px; background: var(--bm-card); color: inherit; text-decoration: none; animation: bm-rise .35s both; transition: border-color .2s; }
.bm-prod:hover { border-color: var(--gold); }
.bm-prod:nth-child(2) { animation-delay: .07s; }
.bm-prod:nth-child(3) { animation-delay: .14s; }
@keyframes bm-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.bm-prod img { flex: none; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--bm-paper-2); }
.bm-buy { display: flex !important; align-items: baseline; gap: 10px; margin-top: 6px !important; }
.bm-buy strong { font: 700 14px var(--font-body); color: var(--forest); }
.bm-buy u { text-decoration: none; font: 600 11.5px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-ink); }
.bm-prod:hover .bm-buy u { text-decoration: underline; text-underline-offset: 3px; }
.bm-prod i { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--gold-soft); border-radius: 50%; background: #F6EBD3; font: 700 11.5px var(--font-body); font-style: normal; color: var(--gold-ink); }
.bm-prod div { min-width: 0; }
.bm-prod b { display: block; font: 600 13.5px/1.25 var(--font-body); }
.bm-prod span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.bm-more { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 4px; font: 600 12px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-ink); text-decoration: none; }
.bm-products.all { max-height: 520px; overflow-y: auto; padding-right: 4px; }
.bm-more[hidden] { display: none; }

/* Подбор за пять вопросов – нижняя часть карты: тот же вопрос «что подходит вашему телу», если зону не выбрать */
.bm-quiz { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: clamp(28px, 4vw, 44px); padding: clamp(22px, 3vw, 36px); border-radius: var(--radius); background: var(--sand); }
.bm-quiz-copy { max-width: 62ch; min-width: 0; }
.bm-quiz-title { margin: 10px 0 0; font: 400 clamp(26px, 2.8vw, 38px)/1.08 var(--font-display); color: var(--ink); text-wrap: balance; }
.bm-quiz p { margin: 10px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.bm-lead a { color: var(--gold-ink); font-weight: 600; }
.bm-full { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font: 600 13px var(--font-body); color: var(--forest); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--gold); }
.bm-full:hover { color: var(--gold-ink); }

/* Полная карта: все зоны с продуктами */
.bm-table { margin: clamp(40px, 6vw, 64px) 0 var(--section); }
.bm-table-title { margin: 0; font: 400 clamp(28px, 4vw, 40px)/1.1 var(--font-display); color: var(--forest); text-wrap: balance; }
.bm-table-sub { max-width: 70ch; margin: 8px 0 18px; font-size: 15px; color: var(--ink-2); }
.bm-row { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--bm-frame); scroll-margin-top: calc(var(--header-h) + 12px); }
.bm-row:last-child { border-bottom: 1px solid var(--bm-frame); }
.bm-row-head { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.bm-row-head img { flex: none; width: 64px; height: 64px; border: 1px solid var(--bm-frame); border-radius: 50%; object-fit: cover; }
.bm-row-head h3 { margin: 0; font: 600 14px/1.25 var(--font-body); letter-spacing: .07em; text-transform: uppercase; color: var(--forest); }
.bm-row-head p { margin: 4px 0 6px; font-size: 13.5px; color: var(--ink-2); }
.bm-row-head button { min-height: 36px; padding: 6px 0; border: 0; background: none; font: 600 11.5px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-ink); cursor: pointer; }
.bm-row-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; min-width: 0; }
.bm-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px; border: 1px solid var(--bm-frame); border-radius: 12px; background: var(--bm-card); color: inherit; text-decoration: none; }
.bm-item:hover { border-color: var(--gold); }
.bm-item img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; margin-bottom: 4px; background: var(--bm-paper-2); }
.bm-item strong { font: 700 13.5px var(--font-body); color: var(--forest); }
.bm-item b { font: 600 13.5px/1.3 var(--font-body); }
.bm-item span { font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.bm-item small { margin-top: 4px; font-size: 12px; line-height: 1.35; color: var(--ink-3); }
.bm-item em { margin-top: 4px; font: 600 11px var(--font-body); font-style: normal; letter-spacing: .05em; text-transform: uppercase; color: var(--danger); }

.bm-prod small.kid { color: var(--forest-2); }
.bm-prod small.nokid { color: var(--danger); font-weight: 600; }
.bm-prod small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.35; color: var(--ink-3); }
.bm-prod em { display: block; margin-top: 4px; font: 600 11px var(--font-body); font-style: normal; letter-spacing: .05em; text-transform: uppercase; color: var(--danger); }
.bm-more { border: 0; background: none; cursor: pointer; }

@media (max-width: 980px) {
  .bm-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bm-figure-col { grid-column: 1; }
  .bm-side { grid-column: 2; padding-top: 0; }
  .bm-tag { display: none; }
}
@media (max-width: 760px) {
  .bm-stage { grid-template-columns: minmax(0, 1fr); }
  .bm-figure-col, .bm-side { grid-column: 1; }
  .bm-figure { width: min(100%, 340px); }
  .bm-seg { width: 100%; max-width: 360px; }
  .bm-quiz { flex-direction: column; align-items: flex-start; }
  .bm-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .bm-quiz .btn { width: 100%; }
  .bm-seg button { flex: 1; min-width: 0; padding: 9px 6px; font-size: 12px; letter-spacing: .03em; }
  .bm-ring, .bm-over { display: none; }
  .bm-lens { width: min(100%, 260px); }
}
@media (prefers-reduced-motion: reduce) {
  .bodymap *, .bodymap *::before, .bodymap *::after { animation: none !important; transition: none !important; }
}
