.lm { --lm-violet:#8d45d1; --lm-deep:#62219f; --lm-pink:#ef6fc9; --lm-ink:#17121c; --lm-muted:#776c7d; max-width: 1040px; margin-inline: auto; color: var(--lm-ink); }
.lm [hidden] { display: none !important; }
.lm__tabs { display: grid; grid-template-columns: repeat(3,1fr); max-width: 520px; margin: 0 auto 18px; padding: 5px; border: 1px solid rgba(98,33,159,.1); border-radius: 999px; background: rgba(255,255,255,.65); box-shadow: 0 12px 35px rgba(45,18,61,.07); backdrop-filter: blur(12px); }
.lm__tabs button { min-height: 46px; padding: 8px 16px; border: 0; border-radius: 999px; background: transparent; color: #716879; font-weight: 700; cursor: pointer; }
.lm__tabs button.is-active { background: linear-gradient(135deg,var(--lm-deep),var(--lm-violet) 60%,var(--lm-pink)); box-shadow: 0 10px 24px rgba(141,69,209,.25); color: #fff; }
.lm__panel { max-width: 860px; margin: auto; }
.lm__form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; padding: 22px; border: 1px solid rgba(112,63,151,.16); border-radius: 24px; background: rgba(255,255,255,.86); box-shadow: 0 24px 70px rgba(55,20,79,.12); backdrop-filter: blur(16px); }
.lm__form--couple { grid-template-columns: 1fr 1fr; }
.lm__form fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 16px; border: 1px solid rgba(112,63,151,.14); border-radius: 17px; }
.lm__form legend { padding-inline: 8px; color: var(--lm-deep); font-weight: 700; }
.lm__gender { grid-column: 1/-1; display: flex; justify-content: center; gap: 8px; }
.lm__gender label { cursor: pointer; }
.lm__gender input { position: absolute; opacity: 0; pointer-events: none; }
.lm__gender span { display: block; padding: 8px 15px; border: 1px solid rgba(112,63,151,.14); border-radius: 999px; color: #6f6674; font-size: .82rem; font-weight: 700; }
.lm__gender input:checked + span { border-color: rgba(141,69,209,.35); background: rgba(141,69,209,.08); color: var(--lm-deep); }
.lm__gender input:focus-visible + span { outline: 2px solid var(--lm-violet); outline-offset: 2px; }
.lm__field { display: grid; gap: 6px; min-width: 0; }
.lm__field > span { padding-left: 3px; color: #5e5564; font-size: .75rem; font-weight: 700; }
.lm__field input { width: 100%; min-height: 52px; padding: 11px 14px; border: 1px solid rgba(112,63,151,.18); border-radius: 13px; outline: 0; background: #fff; color: var(--lm-ink); }
.lm__field input:focus { border-color: var(--lm-violet); box-shadow: 0 0 0 4px rgba(141,69,209,.1); }
.lm__submit { min-height: 52px; padding: 10px 20px; border: 0; border-radius: 14px; background: #17121c; color: #fff; font-weight: 700; white-space: nowrap; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.lm__submit:hover { transform: translateY(-2px); background: var(--lm-deep); }
.lm__submit span { margin-left: 12px; color: #f49bd9; }
.lm__form--couple .lm__submit { grid-column: 1/-1; justify-self: center; }
.lm__privacy, .lm__error { grid-column: 1/-1; margin: 0; text-align: center; font-size: .72rem; }
.lm__privacy { color: #88808d; }
.lm__error { min-height: 1em; color: #a32252; font-weight: 700; }

.lm__result { scroll-margin-top: 110px; margin-top: 44px; padding: clamp(22px,4vw,44px); border: 1px solid rgba(112,63,151,.14); border-radius: 32px; background: rgba(255,255,255,.92); box-shadow: 0 30px 95px rgba(55,20,79,.15); }
.lm__result-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.lm__result-head p, .lm__subhead p { margin: 0 0 5px; color: var(--lm-deep); font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.lm__result-head h2 { margin: 0; font-family: 'Cormorant Garamond',Georgia,serif; font-size: clamp(2.4rem,5vw,4.2rem); font-weight: 500; }
.lm__result-head button { padding: 9px 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--lm-deep); font-weight: 700; cursor: pointer; }
.lm__matrix-wrap { max-width: 730px; margin: 0 auto 30px; padding: 12px; border-radius: 50%; background: radial-gradient(circle, rgba(141,69,209,.09), transparent 62%); }
.lm__matrix { position: relative; aspect-ratio: 1; }
.lm__result[data-result-type="child"] .lm__matrix-wrap{max-width:820px;border-radius:26px;padding:30px 24px clamp(125px,19vw,190px);background:#fff9e8 url('children-garden.png') center/100% 100% no-repeat;box-shadow:inset 0 0 0 1px #eedcb7}
.lm__result[data-result-type="child"] .lm__matrix-wrap::before{content:'La matrice dei bambini';display:block;text-align:center;font-family:'Linfa Cormorant',Georgia,serif;font-size:clamp(1.8rem,4vw,3rem);font-weight:600;color:#40226d;margin:0 0 22px}
.lm__result[data-result-type="child"] .lm__matrix{background:radial-gradient(ellipse,#fffcf3b8 45%,transparent 73%)}
.lm__result[data-result-type="child"] .lm-node.corner{background:#fff;color:#272035;border:2px solid #5d4478;box-shadow:none}
.lm__result[data-result-type="child"] .lm-node.center{background:linear-gradient(135deg,#fff387,#f8cf35);color:#302147;box-shadow:0 0 0 6px #fff7c4,0 0 30px #f6d25780}
.lm__result[data-result-type="child"] .lm-node[data-point="1"],.lm__result[data-result-type="child"] .lm-node[data-point="2"]{background:#8536b2;color:#fff}
.lm__result[data-result-type="child"] .lm-node[data-point="3"],.lm__result[data-result-type="child"] .lm-node[data-point="4"]{background:#d93258;color:#fff}
.lm__result[data-result-type="child"] .lm-node[data-point="7"],.lm__result[data-result-type="child"] .lm-node[data-point="9"]{background:#286bd4;color:#fff}
.lm__result[data-result-type="child"] .lm-node[data-point="6"],.lm__result[data-result-type="child"] .lm-node[data-point="8"]{background:#087e8b;color:#fff}
.lm__result[data-result-type="child"] .lm-node[data-point="17"],.lm__result[data-result-type="child"] .lm-node[data-point="18"]{background:#bedc77;color:#29451b}
.lm__result[data-result-type="child"] .lm-node[data-point="10"],.lm__result[data-result-type="child"] .lm-node[data-point="12"]{background:#ffce69;color:#593400}
@media(max-width:600px){.lm__result[data-result-type="child"]{padding:18px 10px}.lm__result[data-result-type="child"] .lm__matrix-wrap{padding:25px 10px 115px}.lm__result[data-result-type="child"] .lm__matrix-wrap::before{margin-bottom:18px}}
.lm__matrix svg { display: block; width: 100%; height: 100%; overflow: visible; }
.lm__matrix svg line, .lm-shape { fill: none; stroke: rgba(98,33,159,.22); stroke-width: 1.4; }
.lm-shape--outer { stroke: url(#lmGradient); stroke-width: 2.8; }
.lm-ring { fill: none; stroke: rgba(239,111,201,.18); stroke-width: 1; stroke-dasharray: 4 9; }
.lm-center-halo { fill: rgba(141,69,209,.06); stroke: rgba(141,69,209,.15); }
.lm-node { position: absolute; display: grid; width: 36px; height: 36px; place-items: center; transform: translate(-50%,-50%); border: 1px solid rgba(141,69,209,.16); border-radius: 50%; background: #fff; box-shadow: 0 8px 20px rgba(54,24,75,.12); color: var(--lm-ink); font-size: .88rem; font-weight: 800; }
.lm-node.major { width: 62px; height: 62px; color: #fff; font-size: 1.25rem; }
.lm-node.medium { width: 44px; height: 44px; }
.lm-node.small { width: 29px; height: 29px; font-size: .72rem; }
.lm-node.corner { width: 46px; height: 46px; background: #211827; color: #fff; }
.lm-node.center { width: 78px; height: 78px; border: 4px solid rgba(255,255,255,.9); background: linear-gradient(145deg,var(--lm-deep),var(--lm-violet),var(--lm-pink)); box-shadow: 0 16px 40px rgba(141,69,209,.3); color: #fff; font-size: 1.6rem; }
.lm-node.pink { background: linear-gradient(145deg,#d954ac,var(--lm-pink)); }
.lm-node.violet { background: linear-gradient(145deg,var(--lm-deep),var(--lm-violet)); }
.lm-node.gold { background: #fff9e9; border-color: #e7cc88; }
.lm-node.accent { border-color: rgba(239,111,201,.45); color: var(--lm-deep); }
.lm__insights { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.lm-insight { display: grid; min-height: 155px; padding: 18px; border: 1px solid rgba(112,63,151,.13); border-radius: 18px; background: linear-gradient(150deg,#fff,rgba(247,238,251,.8)); }
.lm-insight strong { font-family: 'Cormorant Garamond',Georgia,serif; color: var(--lm-violet); font-size: 3.3rem; font-weight: 600; line-height: 1; }
.lm-insight span { align-self: end; font-weight: 700; }
.lm-insight small { color: var(--lm-muted); font-size: .68rem; }
.lm__all-points { margin-top: 34px; padding: clamp(20px,3vw,32px); border: 1px solid rgba(112,63,151,.13); border-radius: 22px; background: rgba(251,247,252,.72); }
.lm__point-list { display: grid; grid-template-columns: repeat(8,1fr); gap: 9px; }
.lm__point-item { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 7px; padding: 9px 11px; border: 1px solid rgba(112,63,151,.12); border-radius: 12px; background: #fff; }
.lm__point-item span { color: var(--lm-muted); font-size: .68rem; font-weight: 700; }
.lm__point-item strong { color: var(--lm-deep); font-family: 'Cormorant Garamond',Georgia,serif; font-size: 1.45rem; }
.lm__health { margin-top: 34px; padding-top: 30px; border-top: 1px solid rgba(112,63,151,.13); }
.lm__subhead h3 { margin: 0 0 18px; font-family: 'Cormorant Garamond',Georgia,serif; font-size: 2.4rem; }
.lm__health-scroll { overflow-x: auto; }
.lm__health table { width: 100%; min-width: 560px; border-collapse: collapse; }
.lm__health th, .lm__health td { padding: 13px 16px; border-bottom: 1px solid rgba(112,63,151,.1); text-align: center; }
.lm__health th:first-child { text-align: left; }
.lm__health thead th { color: var(--lm-muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.lm__health tbody th { position: relative; padding-left: 28px; font-size: .88rem; }
.lm__health tbody th::before { content:''; position:absolute; left:8px; top:50%; width:9px; height:9px; transform:translateY(-50%); border-radius:50%; background:#9253c5; }
.lm__health .chakra-2 th::before { background:#4858bf; }.lm__health .chakra-3 th::before { background:#4ca8d4; }.lm__health .chakra-4 th::before { background:#5eb87c; }.lm__health .chakra-5 th::before { background:#e7bd48; }.lm__health .chakra-6 th::before { background:#e58d45; }.lm__health .chakra-7 th::before { background:#c64f61; }
.lm__disclaimer { margin: 25px 0 0; color: var(--lm-muted); font-size: .72rem; text-align: center; }

@media (max-width: 780px) {
  .lm__form, .lm__form--couple { grid-template-columns: 1fr; }
  .lm__form fieldset { grid-template-columns: 1fr; }
  .lm__submit { width: 100%; }
  .lm__insights { grid-template-columns: repeat(2,1fr); }
  .lm__point-list { grid-template-columns: repeat(4,1fr); }
}
@media (max-width: 520px) {
  .lm__tabs button { padding-inline: 8px; font-size: .75rem; }
  .lm__form { padding: 16px; border-radius: 19px; }
  .lm__result { padding: 16px; border-radius: 22px; }
  .lm__result-head { align-items: flex-start; flex-direction: column; }
  .lm-node { width: 28px; height: 28px; font-size: .7rem; }
  .lm-node.major { width: 46px; height: 46px; font-size: 1rem; }
  .lm-node.corner, .lm-node.medium { width: 34px; height: 34px; }
  .lm-node.center { width: 58px; height: 58px; font-size: 1.3rem; }
  .lm-node.small { width: 22px; height: 22px; font-size: .6rem; }
  .lm__insights { grid-template-columns: 1fr 1fr; gap: 8px; }
  .lm-insight { min-height: 135px; padding: 14px; }
}
.lm__insights[hidden] { display: none; }
