/* «Probá en tu pared», fase 1 (18/10/2026): paso 1, la foto en el escenario, Tapar, y los tres diálogos (cámara,
   lámina sin cámara, marcar esquinas). Tokens de HOME (tokens.css); en celular ningún texto baja de 16 px. */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.has-dlg, html.has-dlg body { overflow: hidden; }

/* ---------- Paso 1 ---------- */
.modo__ops { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
@media (max-width: 479px) { .modo__ops { grid-template-columns: 1fr; } }
.modo__op { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; min-height: 76px; padding: 12px 16px; border: 1.5px solid var(--hi-control); border-radius: var(--hi-r-4); background: #fff; text-align: left; transition: transform var(--hi-motion-fast) var(--hi-motion-ease-out), border-color var(--hi-motion-fast); }
.modo__op:active { transform: scale(.98); }
.modo__op svg { grid-row: 1 / 3; width: 32px; height: 32px; fill: none; stroke: var(--hi-pino); stroke-width: 1.6; stroke-linejoin: round; }
.modo__op b { font-weight: 600; line-height: 1.25; }
.modo__op span { color: var(--hi-piedra); line-height: 1.3; }
.modo__op[aria-pressed="true"] { border-color: var(--hi-helecho); background: var(--hi-helecho-suave); box-shadow: 0 0 0 1px var(--hi-helecho); }
@media (hover: hover) and (pointer: fine) { .modo__op:hover { border-color: var(--hi-grafito); } }
.modo__panel { display: flex; gap: 14px; align-items: center; margin-top: 14px; padding: 12px; border-radius: var(--hi-r-3); background: var(--hi-cal); }
.modo__panel[hidden] { display: none; }
.modo__panel img { flex: none; width: 96px; height: 72px; object-fit: cover; border-radius: var(--hi-r-2); }
.modo__info { min-width: 0; }
.modo__info .ayuda { margin-top: 0; }
.modo__info a { color: var(--hi-helecho); }
.modo__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ejemplos { margin-top: 16px; }
.ejemplos__t { font-weight: 600; }
.ejemplos__lista { display: flex; gap: 10px; margin: 10px -16px 0; padding: 0 16px 4px; overflow-x: auto; }
.ej { flex: none; display: grid; gap: 4px; width: 128px; padding: 4px 4px 8px; border: 1.5px solid var(--hi-junta); border-radius: var(--hi-r-3); background: #fff; font-weight: 500; text-align: left; transition: transform var(--hi-motion-fast) var(--hi-motion-ease-out); }
.ej:active { transform: scale(.97); }
.ej img { display: block; width: 100%; height: 80px; object-fit: cover; border-radius: var(--hi-r-2); }
.ej span { padding: 0 4px; }
.ej[aria-busy="true"] { opacity: .6; }
.aviso { margin-top: 10px; padding: 10px 14px; border-radius: var(--hi-r-2); background: var(--hi-cesped-suave); color: var(--hi-grafito); font-weight: 500; }
.aviso[hidden] { display: none; }
.aviso--alerta { background: var(--hi-pisos-suave); }
.aviso__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
#wa-nota { margin-top: 16px; }
/* ---------- Tapar ---------- */
/* 2/11: sus opciones van en la barra contextual (#ctx) */
.seg { display: flex; gap: 4px; padding: 4px; background: #fff; border-radius: var(--hi-r-full); }
.seg button { min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--hi-r-full); background: transparent; font-weight: 600; }
.seg button[aria-checked="true"] { background: var(--hi-grafito); color: #fff; }
.tapar__tam { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.tapar__tam input { width: 60px; min-height: 44px; accent-color: var(--hi-helecho); }
.tapar__tam { gap: 6px; }
.tam { display: block; flex: none; border-radius: 50%; background: var(--hi-grafito); }
.tam--s { width: 8px; height: 8px; }
.tam--l { width: 20px; height: 20px; }
@media (min-width: 1024px) { .tapar__tam input { width: 140px; } }

/* ---------- La foto en el escenario ---------- */
.stage.is-photo { background: transparent; }
.pf { position: absolute; overflow: hidden; }
.pf[hidden] { display: none; }
.pf__img, .pf__light { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; -webkit-user-select: none; }
.pf__proj { position: absolute; inset: 0; overflow: hidden; pointer-events: none; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.pf__proj .wall { pointer-events: auto; }
.pf__light { mix-blend-mode: soft-light; opacity: .35; }
.pf__light[hidden] { display: none; }
.pf__tapar { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; }
.is-tapando .pf__tapar { pointer-events: auto; opacity: .55; touch-action: none; cursor: crosshair; }
.is-photo .wall { background: transparent; box-shadow: none; overflow: hidden; }
.is-photo .wall__dim, .is-photo .cota { display: none; }
.is-photo .cell.is-empty { background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.62); }
/* Rótulo del corte con foto: abajo de la columna de la pared, sin taparla */
.corte { position: absolute; z-index: 7; left: 8px; bottom: 6px; max-width: calc(100% - 16px); padding: 4px 10px; border-radius: var(--hi-r-2); background: var(--hi-grafito); color: #fff; font-weight: 600; line-height: 1.3; }
@media (min-width: 1024px) { .corte { left: 24px; bottom: 12px; } }
.corte[hidden] { display: none; }

/* ---------- Diálogos ---------- */
.dlg { position: fixed; inset: 0; z-index: 100; }
.dlg[hidden] { display: none; }
.dlg svg path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* Cámara en vivo */
.cam { background: #000; color: #fff; overflow: hidden; touch-action: none; }
.cam__v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam__guide { position: absolute; box-shadow: 0 0 0 200vmax rgba(0,0,0,.42); outline: 1px solid rgba(255,255,255,.55); }
.cam__guide > i { position: absolute; width: 30px; height: 30px; border: 0 solid var(--hi-lima); }
.cam__guide > i:nth-child(1) { left: -3px; top: -3px; border-width: 4px 0 0 4px; }
.cam__guide > i:nth-child(2) { right: -3px; top: -3px; border-width: 4px 4px 0 0; }
.cam__guide > i:nth-child(3) { right: -3px; bottom: -3px; border-width: 0 4px 4px 0; }
.cam__guide > i:nth-child(4) { left: -3px; bottom: -3px; border-width: 0 0 4px 4px; }
.cam__piso { position: absolute; left: -8px; right: -8px; height: 44px; transform: translateY(-50%); cursor: ns-resize; touch-action: none; }
.cam__piso::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--hi-lima); }
.cam__piso span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); padding: 2px 10px; border-radius: var(--hi-r-full); background: var(--hi-lima); color: var(--hi-noche); font-weight: 600; }
.cam__piso:focus-visible { outline: 3px solid #fff; }
.cam__top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 16px 12px; background: linear-gradient(rgba(0,0,0,.55), transparent); }
.cam__x, .sheet__x { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; }
.cam__x svg, .sheet__x svg { width: 22px; height: 22px; }
.cam__tip { flex: 1; font-weight: 600; line-height: 1.3; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.cam__nivel { display: flex; align-items: center; gap: 8px; }
.cam__nivel[hidden] { display: none; }
.cam__nivel b { font-weight: 600; max-width: 9em; line-height: 1.2; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.cam__burbuja { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid #fff; border-radius: 50%; }
.cam__burbuja::after { content: ""; position: absolute; width: 14px; height: 14px; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; }
.cam__burbuja i { width: 12px; height: 12px; border-radius: 50%; background: #F2B33D; }
.cam__nivel.is-ok .cam__burbuja { border-color: var(--hi-lima); }
.cam__nivel.is-ok .cam__burbuja i { background: var(--hi-lima); }
.cam__bar { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 16px 16px max(20px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.cam__lado { justify-self: start; min-height: 44px; padding: 0 16px; border: 1.5px solid rgba(255,255,255,.7); border-radius: var(--hi-r-full); background: rgba(0,0,0,.25); color: #fff; font-weight: 600; }
.cam__lado[data-act="nivel"] { justify-self: end; }
.cam__lado[hidden] { display: none; }
.cam__shot { width: 76px; height: 76px; border: 4px solid #fff; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: inset 0 0 0 4px #000; transition: transform var(--hi-motion-fast) var(--hi-motion-ease-out); }
.cam__shot:active { transform: scale(.94); }
.cam__shot:disabled { opacity: .5; }
.cam__rev { position: absolute; inset: 0; display: flex; flex-direction: column; background: #000; }
.cam__rev[hidden] { display: none; }
.cam__rev img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.cam__rev-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); background: var(--hi-noche); }
.cam__rev-bar p { flex: 1 1 100%; font-weight: 600; }
@media (min-width: 600px) { .cam__rev-bar p { flex: 1; } }

/* Sin cámara en vivo: la lámina */
.sheet { display: grid; place-items: center; padding: 16px; background: rgba(19,22,20,.6); overflow-y: auto; }
.sheet__in { position: relative; width: 100%; max-width: 480px; padding: 20px; border-radius: var(--hi-r-5); background: #fff; box-shadow: var(--hi-sh-3); }
.sheet__x { position: absolute; right: 10px; top: 10px; background: var(--hi-cal); color: var(--hi-grafito); }
.sheet h2 { padding-right: 48px; font: 600 var(--hi-t-h3-size)/1.25 var(--hi-font-display); color: var(--hi-pino); }
.sheet__dib { display: block; width: 100%; height: auto; margin-top: 14px; }
.sheet__tips { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.sheet__aviso { margin-top: 12px; padding: 10px 12px; border-radius: var(--hi-r-3); background: var(--hi-error-suave); color: var(--hi-error); font-weight: 500; }
.sheet__aviso[hidden] { display: none; }
.sheet__bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Marcar la pared: arriba del paso 2 (2/11; antes era un diálogo de pantalla completa) */
.mk-slot { margin-top: 16px; }
.mk { border-radius: var(--hi-r-3); background: var(--hi-noche); }
.mk__area { display: grid; place-items: center; padding: 24px; }
.mk__box { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; }
.mk__img { display: block; width: 100%; height: 100%; pointer-events: none; }
.mk__lines { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.mk__h { position: absolute; z-index: 2; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 3px solid var(--hi-lima); border-radius: 50%; background: rgba(19,22,20,.28); touch-action: none; cursor: grab; }
.mk__h::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--hi-lima); }
.mk__h.is-drag { cursor: grabbing; background: rgba(155,208,110,.25); }
.mk__h:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.mk__lupa { position: absolute; z-index: 3; width: 132px; height: 132px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 8px 24px rgba(0,0,0,.5); pointer-events: none; }
.mk__lupa[hidden] { display: none; }
.cam .btn--wa { background: var(--hi-lima); color: var(--hi-noche); }
.cam .btn--light { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .modo__op, .ej, .cam__shot { transition: none; }
}
