/* «Mi sonrisa» (ADR 0245). Usa las variables de marca de styles.css. */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.ms-hero { padding: clamp(40px, 7vw, 84px) 0 clamp(18px, 3vw, 30px); background: radial-gradient(900px 380px at 85% -10%, var(--blue-100), transparent 70%), var(--blue-50); }
.ms-hero h1 { margin: 14px 0 14px; }
.ms-hero .lead { margin-bottom: 18px; }
.ms-chip { display: inline-flex; align-items: flex-start; gap: 10px; padding: 10px 16px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--muted); font-size: 0.9rem; max-width: 70ch; }
.ms-chip .ic { margin-top: 3px; color: var(--blue-600); }

.ms { padding: 18px 0 clamp(48px, 7vw, 88px); background: var(--blue-50); }
.ms-tabs { display: inline-flex; gap: 6px; padding: 6px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow-sm); margin-bottom: 20px; }
.ms-tab { border: 0; background: transparent; padding: 10px 22px; border-radius: 999px; font-weight: 700; font-size: 0.95rem; color: var(--muted); cursor: pointer; transition: background 0.2s, color 0.2s; }
.ms-tab.is-active { background: linear-gradient(135deg, var(--blue-600), var(--navy-800)); color: #fff; box-shadow: 0 8px 18px rgba(29, 95, 224, 0.3); }
.ms-tab:not(.is-active):hover { color: var(--navy-900); }

.ms-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr); gap: clamp(18px, 2.4vw, 32px); align-items: start; }

/* Escenario */
.ms-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ms-view { margin: 0; }
.ms-view__box { position: relative; aspect-ratio: 4 / 3.3; border-radius: 22px; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #17376f 0%, #0a2a66 45%, #061836 100%); box-shadow: var(--shadow-md); }
.ms-view__box::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(147, 188, 255, 0.05) 0 1px, transparent 1px 4px); mix-blend-mode: screen; }
.ms-view--after .ms-view__box { box-shadow: 0 0 0 2px var(--blue-400), 0 18px 44px rgba(29, 95, 224, 0.3); }
.ms-view canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.ms-view canvas:active { cursor: grabbing; }
.ms-view figcaption { display: flex; flex-direction: column; gap: 2px; padding: 10px 6px 0; font-size: 0.88rem; color: var(--muted); }
.ms-view figcaption b { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy-900); }
.ms-fallback, .ms-loading { grid-column: 1 / -1; padding: 22px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--muted); }

.ms-views { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 6px; }
.ms-pill { border: 0; cursor: pointer; padding: 8px 16px; border-radius: 999px; background: #fff; color: var(--navy-900); font-weight: 600; font-size: 0.88rem; box-shadow: inset 0 0 0 1.5px var(--line); transition: background 0.2s, color 0.2s; }
.ms-pill.is-active { background: var(--navy-900); color: #fff; box-shadow: none; }
.ms-hint { margin-left: auto; font-size: 0.82rem; color: var(--muted); }

/* Línea de tiempo */
.ms-timeline { margin-top: 18px; padding: 18px 20px 14px; border-radius: 20px; background: #fff; box-shadow: var(--shadow-sm), inset 0 0 0 1.5px var(--line); }
.ms-timeline__bar { display: flex; align-items: center; gap: 16px; }
.ms-play { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--blue-600), var(--navy-800)); box-shadow: 0 8px 18px rgba(29, 95, 224, 0.35); }
.ms-play .ic { width: 20px; height: 20px; }
.ms-range { position: relative; flex: 1; padding-bottom: 66px; }
.ms-range input[type='range'] { width: 100%; margin: 0; -webkit-appearance: none; appearance: none; height: 26px; background: transparent; cursor: pointer; }
.ms-range input[type='range']::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--blue-200), var(--blue-500)); }
.ms-range input[type='range']::-moz-range-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--blue-200), var(--blue-500)); }
.ms-range input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: #fff; border: 4px solid var(--blue-600); box-shadow: 0 4px 12px rgba(10, 42, 102, 0.3); }
.ms-range input[type='range']::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--blue-600); box-shadow: 0 4px 12px rgba(10, 42, 102, 0.3); }
.ms-ticks { position: absolute; left: 12px; right: 12px; top: 22px; height: 0; }
.ms-tick { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.ms-tick i { width: 2px; height: 8px; background: var(--blue-300); border-radius: 2px; }
.ms-tick--r1 i { height: 20px; }
.ms-tick--r2 i { height: 32px; }
.ms-tick em { white-space: nowrap; margin-top: 4px; font-style: normal; font-size: 0.7rem; line-height: 1.15; text-align: center; color: var(--muted); max-width: 78px; font-weight: 600; }
.ms-timeline__out { margin-top: 2px; font-weight: 700; color: var(--navy-900); }

/* Panel del plan */
.ms-plan { padding: clamp(18px, 2vw, 26px); border-radius: 24px; background: #fff; box-shadow: var(--shadow-md), inset 0 0 0 1.5px var(--line); position: sticky; top: 100px; }
.ms-plan h3 { font-size: 1.25rem; margin-bottom: 12px; }
.ms-treat { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.ms-opt { display: block; cursor: pointer; }
.ms-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ms-opt__body { display: flex; flex-direction: column; gap: 1px; padding: 12px 16px 12px 46px; border-radius: 16px; background: var(--blue-50); box-shadow: inset 0 0 0 1.5px var(--line); position: relative; transition: background 0.2s, box-shadow 0.2s; }
.ms-opt__body::before { content: ''; position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; border-radius: 7px; background: #fff; box-shadow: inset 0 0 0 2px var(--blue-300); transition: background 0.2s; }
.ms-opt__body::after { content: ''; position: absolute; left: 19px; top: 50%; translate: 0 -62%; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; rotate: 45deg; opacity: 0; transition: opacity 0.2s; }
.ms-opt input:checked + .ms-opt__body { background: var(--blue-100); box-shadow: inset 0 0 0 2px var(--blue-500); }
.ms-opt input:checked + .ms-opt__body::before { background: var(--blue-600); box-shadow: none; }
.ms-opt input:checked + .ms-opt__body::after { opacity: 1; }
.ms-opt input:focus-visible + .ms-opt__body { outline: 3px solid var(--blue-400); outline-offset: 2px; }
.ms-opt b { color: var(--navy-900); }
.ms-opt small { color: var(--muted); font-size: 0.84rem; }
.ms-shades { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 6px; }
.ms-shades label { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.ms-tryon__btns [hidden] { display: none; }
.ms-tryon__ctrl select, .ms-shades select { padding: 9px 12px; width: 100%; border-radius: 12px; border: 0; background: var(--blue-50); box-shadow: inset 0 0 0 1.5px var(--line); font: inherit; color: var(--ink); }
.ms-cart__title { margin-top: 22px; }
.ms-cart { display: grid; gap: 8px; margin: 0; }
.ms-cart li { display: flex; justify-content: space-between; gap: 14px; padding: 11px 14px; border-radius: 14px; background: var(--blue-50); }
.ms-cart li.is-later { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); border-style: dashed; }
.ms-cart__main { display: flex; flex-direction: column; gap: 2px; }
.ms-cart__main b { color: var(--navy-900); font-size: 0.95rem; }
.ms-cart__main small { color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.ms-cart__price { white-space: nowrap; font-weight: 700; color: var(--navy-900); }
.ms-cart__empty { color: var(--muted); }
.ms-total { margin-top: 12px; font-size: 1.05rem; color: var(--navy-900); }
.ms-note { margin-top: 4px; font-size: 0.82rem; color: var(--muted); }
.ms-actions { display: grid; gap: 10px; margin-top: 16px; }
.ms-actions .btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.ms-share-out { margin-top: 10px; min-height: 1.2em; font-size: 0.85rem; color: var(--blue-700); word-break: break-all; }
.ms-privacy { display: flex; align-items: flex-start; gap: 10px; margin-top: 26px; font-size: 0.88rem; color: var(--muted); max-width: 80ch; }
.ms-privacy .ic { margin-top: 4px; color: var(--blue-600); }

/* Probador de sonrisa */
.ms-tryon { display: grid; gap: 18px; }
.ms-tryon__top { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr); gap: clamp(18px, 2.4vw, 32px); align-items: start; }
.ms-tryon__stage { position: relative; border-radius: 22px; overflow: hidden; background: #0a2a66; box-shadow: var(--shadow-md); aspect-ratio: 4 / 3; touch-action: pan-y; user-select: none; }
.ms-tryon__stage canvas, .ms-tryon__stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ms-tryon__after { clip-path: inset(0 0 0 var(--cut, 50%)); }
.ms-tryon__handle { position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, 0.35); pointer-events: none; }
.ms-tryon__handle::after { content: '⇆'; position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 1.1rem; color: var(--navy-900); box-shadow: var(--shadow-md); }
.ms-tryon__tag { position: absolute; top: 12px; padding: 4px 12px; border-radius: 999px; background: rgba(6, 24, 54, 0.7); color: #fff; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; pointer-events: none; }
.ms-tryon__tag--l { left: 12px; }
.ms-tryon__tag--r { right: 12px; }
.ms-tryon__msg { position: absolute; inset: auto 12px 12px; padding: 10px 14px; border-radius: 12px; background: rgba(6, 24, 54, 0.78); color: #fff; font-size: 0.88rem; pointer-events: none; }
.ms-tryon__ctrl { padding: clamp(18px, 2vw, 26px); border-radius: 24px; background: #fff; box-shadow: var(--shadow-md), inset 0 0 0 1.5px var(--line); display: grid; gap: 14px; }
.ms-tryon__ctrl h3 { font-size: 1.25rem; }
.ms-tryon__btns { display: grid; gap: 8px; }
.ms-tryon__ctrl label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.ms-tryon__ctrl input[type='range'] { width: 100%; accent-color: var(--blue-600); }
.ms-tryon__legend { font-size: 0.85rem; color: var(--muted); }

@media (max-width: 980px) {
  .ms-grid, .ms-tryon__top { grid-template-columns: 1fr; }
  .ms-plan { position: static; }
}
@media (max-width: 620px) {
  .ms-stage { grid-template-columns: 1fr; }
  .ms-hint { display: none; }
  .ms-tick em { display: none; }
  .ms-range { padding-bottom: 14px; }
  .ms-tick i { display: none; }
  .ms-tabs { display: flex; }
  .ms-tab { flex: 1; padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ms-tab, .ms-pill, .ms-opt__body, .ms-opt__body::before, .ms-opt__body::after { transition: none; }
}
