:root {
        --bg: #0f172a; /* slate-900 */
        --card: #ffffff; /* white */
        --ink: #0f172a; /* slate-900 */
        --muted: #64748b; /* slate-500 */
        --brand: #2563eb; /* blue-600 */
        --brand-2: #4f46e5; /* indigo-600 */
        --ok: #16a34a; /* green-600 */
        --warn: #eab308; /* yellow-500 */
        --bad: #dc2626; /* red-600 */
        --ring: 0 0 0 3px rgba(37, 99, 235, 0.2);
        --radius: 18px;
      }
      * {
        box-sizing: border-box;
      }
      html,
      body {
        height: 100%;
      }
      body {
        margin: 0;
        font-family: system-ui, Segoe UI, Roboto, Inter, Ubuntu,
          "Helvetica Neue", Arial, sans-serif;
        background: radial-gradient(
            1200px 600px at 80% -10%,
            rgba(37, 99, 235, 0.15),
            transparent
          ),
          radial-gradient(
            900px 500px at 10% 120%,
            rgba(79, 70, 229, 0.18),
            transparent
          ),
          var(--bg);
        color: var(--ink);
      }
      .wrap {
        min-height: 100%;
        display: grid;
        place-items: center;
        padding: 24px;
      }
      .card {
        width: min(1100px, 96vw);
        background: var(--card);
        border-radius: var(--radius);
        box-shadow: 0 30px 90px rgba(2, 6, 23, 0.35),
          0 8px 24px rgba(2, 6, 23, 0.25);
        overflow: hidden;
      }
      .header {
        padding: 20px 24px;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        gap: 12px;
        align-items: center;
      }
      .dot {
        width: 10px;
        height: 10px;
        border-radius: 999px;
        background: var(--brand);
      }
      .title {
        font-weight: 700;
        letter-spacing: 0.2px;
      }
      .screen {
        padding: 24px;
        display: grid;
        gap: 16px;
      }
      .grid {
        display: grid;
        gap: 12px;
      }
      .grid.cols-2 {
        grid-template-columns: 1fr 1fr;
      }
      .row {
        display: flex;
        gap: 12px;
        align-items: center;
      }
      .muted {
        color: var(--muted);
      }
      .btn {
        appearance: none;
        border: none;
        padding: 12px 18px;
        border-radius: 12px;
        cursor: pointer;
        font-weight: 600;
        background: linear-gradient(135deg, var(--brand), var(--brand-2));
        color: white;
        transition: transform 0.05s ease, box-shadow 0.2s ease, filter 0.2s ease;
        box-shadow: 0 8px 18px rgba(37, 99, 235, 0.3);
      }
      .btn:disabled {
        opacity: 0.5;
        filter: grayscale(0.2);
        cursor: not-allowed;
        box-shadow: none;
      }
      .btn.secondary {
        background: #f1f5f9;
        color: #0f172a;
        box-shadow: none;
      }
      .btn.error {
        background: rgb(255, 0, 128,1);
        color: #ffffff;
        box-shadow: none;
      }
      .btn.ghost {
        background: transparent;
        color: var(--muted);
      }
      .btn:active {
        transform: translateY(1px);
      }
      .pill {
        display: inline-block;
        padding: 6px 10px;
        border-radius: 999px;
        background: #eef2ff;
        color: #3730a3;
        font-weight: 700;
        font-size: 12px;
      }
      .centerbox {
        width: min(900px, 92vw);
        height: min(520px, 68vh);
        margin: 0 auto;
        background: white;
        border-radius: 16px;
        border: 1px solid #e5e7eb;
        position: relative;
        overflow: hidden;
        display: grid;
        place-items: center;
        padding: 12px;
      }
      .toolbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
      }
      .progress {
        height: 10px;
        background: #e5e7eb;
        border-radius: 99px;
        overflow: hidden;
      }
      .progress > div {
        height: 100%;
        background: linear-gradient(90deg, var(--brand), var(--brand-2));
        width: 0%;
      }
      .footer {
        padding: 18px 24px;
        border-top: 1px solid #e5e7eb;
        display: flex;
        gap: 10px;
        justify-content: space-between;
        align-items: center;
      }
      .kpi {
        display: flex;
        gap: 10px;
        align-items: center;
      }
      .kpi .val {
        font-weight: 800;
      }
      .criteria {
        background: #f8fafc;
        border: 1px dashed #e2e8f0;
        padding: 12px;
        border-radius: 12px;
        font-size: 14px;
      }
      .good {
        color: var(--ok);
      }
      .warn {
        color: var(--warn);
      }
      .bad {
        color: var(--bad);
      }
      .hidden {
        display: none !important;
      }
      .circle {
        width: 44px;
        height: 44px;
        border-radius: 999px;
        background: #dbeafe;
        border: 2px solid #3b82f6;
        position: absolute;
        cursor: pointer;
        display: grid;
        place-items: center;
      }
      .circle.moving {
        transition: left 0.12s linear, top 0.12s linear; /* o quítala si prefieres movimiento instantáneo */
      }

      .floating {
        animation: float 4s ease-in-out infinite;
      }
      @keyframes float {
        0%,
        100% {
          transform: translateY(-2px);
        }
        50% {
          transform: translateY(2px);
        }
      }
      .ctx-item {
        width: 90px;
        height: 70px;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        display: grid;
        place-items: center;
        background: #f8fafc;
        cursor: context-menu;
      }
      .context {
        position: absolute;
        background: #111827;
        color: white;
        border-radius: 8px;
        padding: 8px;
        font-size: 14px;
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
      }
      .context button {
        display: block;
        width: 100%;
        text-align: left;
        background: transparent;
        border: none;
        color: white;
        padding: 8px 10px;
        border-radius: 6px;
        cursor: pointer;
      }
      .context button:hover {
        background: rgba(255, 255, 255, 0.08);
      }
      .window {
        position: absolute;
        width: 260px;
        height: 170px;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 8px 24px rgba(2, 6, 23, 0.1);
      }
      .winbar {
        height: 36px;
        background: #f1f5f9;
        display: flex;
        align-items: center;
        padding: 0 8px;
        gap: 8px;
        cursor: move;
      }
      .winbtn {
        width: 12px;
        height: 12px;
        border-radius: 999px;
      }
      .close {
        background: #ef4444;
      }
      .max {
        background: #f59e0b;
      }
      .min {
        background: #22c55e;
      }
      .resizer {
        position: absolute;
        width: 14px;
        height: 14px;
        right: 2px;
        bottom: 2px;
        border-right: 3px solid #cbd5e1;
        border-bottom: 3px solid #cbd5e1;
        cursor: nwse-resize;
      }
      .file {
        width: 64px;
        height: 82px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #f8fafc;
        display: grid;
        place-items: center;
        font-size: 12px;
        position: absolute;
        cursor: grab;
      }
      .folder {
        width: 120px;
        height: 80px;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        background: #fff7ed;
        display: grid;
        place-items: center;
      }
      .target {
        outline: 3px dashed #f59e0b;
        outline-offset: 4px;
      }
      .tiny {
        width: 22px;
        height: 22px;
        border-radius: 999px;
        border: 2px solid #334155;
        background: #e2e8f0;
        position: absolute;
        cursor: pointer;
      }
      .path {
        position: absolute;
        inset: 24px;
        border-radius: 14px;
        background: radial-gradient(
            circle at 50% 50%,
            transparent 40%,
            rgba(99, 102, 241, 0.12) 40% 44%,
            transparent 44%
          ),
          repeating-linear-gradient(
            90deg,
            rgba(99, 102, 241, 0.2) 0 12px,
            transparent 12px 24px
          );
        overflow: hidden;
      }
      .track {
        position: absolute;
        inset: 10% 15%;
        border-radius: 14px;
        background: rgba(37, 99, 235, 0.08);
        border: 2px dashed #93c5fd;
      }
      .cursor-dot {
        position: absolute;
        width: 14px;
        height: 14px;
        border-radius: 999px;
        background: #0ea5e9;
        pointer-events: none;
      }
      .typebox {
        display: grid;
        gap: 8px;
        text-align: center;
      }
      .typearea {
        font-size: 18px;
        padding: 12px;
        border: 1px solid #cbd5e1;
        border-radius: 12px;
        width: 100%;
        outline: none;
      }
      .ghost-text {
        letter-spacing: 2px;
      }
      .scoreline {
        display: flex;
        justify-content: space-between;
        font-size: 14px;
        padding: 4px 0;
        border-bottom: 1px dotted #e5e7eb;
      }
      .bigmsg {
        font-size: 24px;
        font-weight: 800;
        text-align: center;
      }/* CSS extraído de inicio.html */
/* ...el código CSS se insertará aquí... */
.contenedor-izquierda,
.contenedor-derecha {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 40%;
  height: 100%;
  justify-content: center;
  align-items: center;
}

.contenedor-izquierda {
  position: absolute;
  left: 0;
}

.contenedor-derecha {
  position: absolute;
  right: 0;
}

.palabra {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: bold;
  color: var(--ink);
  cursor: pointer;
}

.circulo {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--brand);
  border: 2px solid var(--brand-2);
}

.linea {
  position: absolute;
  height: 2px;
  background-color: var(--brand);
  transform-origin: left center;
}

.radio-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 22px;
  opacity: 0.9;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.radio-group input[type="radio"] {
  accent-color: var(--brand);
  width: 24px;
  height: 24px;
  cursor: pointer;
}
