:root {
  --bg: #F3F2F7;
  --card: #fff;
  --tx: #1f2937;
  --mut: #8a8a8e;
  --naranja: #EE6B41;
  --menta: #5FD6BD;
  --navy: #27254F;
  --ok: #16a34a;
  --warn: #d97706;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; background: var(--bg); color: var(--tx); min-height: 100vh; }
.wrap { max-width: 520px; margin: auto; padding: 16px; }
h1 { font-size: 22px; color: var(--navy); margin: 8px 0 4px; }
h2 { font-size: 17px; color: var(--navy); margin: 0 0 8px; }
.sub { color: var(--mut); font-size: 13px; }
.card { background: var(--card); border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card.centro { text-align: center; }
button { font: inherit; border: 0; border-radius: 99px; padding: 13px 16px; font-weight: 700; cursor: pointer; width: 100%; }
.p { background: var(--naranja); color: #fff; }
.o { background: transparent; color: #2bb59e; border: 2px solid var(--menta); }
button:disabled { opacity: .4; cursor: not-allowed; }
.row { display: flex; gap: 8px; margin-top: 10px; }
.row > button { flex: 1; }
video, canvas.prev { width: 100%; border-radius: 12px; background: #000; display: block; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #fff; }
.kv { font-size: 13px; line-height: 1.7; }
.hide { display: none !important; }
.note { font-size: 12px; color: var(--mut); margin-top: 6px; }
label.chk { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 14px; }
label.chk input { width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; }
.tag { font-size: 11px; background: #fff3ed; color: var(--naranja); padding: 2px 8px; border-radius: 99px; font-weight: 700; }

.grid9 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.casilla {
  aspect-ratio: 3/4;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 2px solid var(--menta);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.casilla.obligatoria { border-color: var(--naranja); }
.casilla img { width: 100%; height: 100%; object-fit: cover; display: block; }
.casilla .etiqueta { font-size: 11px; text-align: center; color: var(--navy); padding: 4px; }
.casilla .check {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 99px;
  background: var(--menta); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

.overlay {
  position: fixed; inset: 0; background: rgba(15,15,40,.5);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 10;
}
.modalCard { background: #fff; border-radius: 16px; padding: 18px; max-width: 420px; width: 100%; }

.spinner {
  width: 40px; height: 40px; margin: 0 auto 10px;
  border: 4px solid var(--bg); border-top-color: var(--naranja);
  border-radius: 99px; animation: girar 0.8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }
.check {
  width: 64px; height: 64px; margin: 0 auto 10px;
  border-radius: 99px; background: var(--menta); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700;
}
