#app>.scale-child.screen {
  --scene-ink:#fff8e9;--scene-muted:#c9cce6;--scene-accent:#ffe292;--scene-button-ink:#382c4b;
  position:relative;isolation:isolate;display:grid;grid-template-rows:auto minmax(0,1fr) auto;
  width:100%;max-width:none;height:100dvh;min-height:100dvh;box-sizing:border-box;
  margin:0;padding:22px clamp(16px,4vw,60px) 15px;gap:12px;
  color:var(--scene-ink);background:radial-gradient(ellipse at 50% 95%,#554174 0,transparent 58%),linear-gradient(160deg,#141d3b,#252b50 55%,#38345b);
}
#app>.scale-child--park.screen {
  --scene-ink:#294831;--scene-muted:#5b7155;--scene-accent:#466536;--scene-button-ink:#fffef6;
  background:radial-gradient(ellipse at 60% 0,#f9f6d9,transparent 65%),linear-gradient(#e7f1e2,#f1f3de);
}
#app>.scale-child--balloons.screen {
  --scene-ink:#1c3b55;--scene-muted:#4f7891;--scene-accent:#ffb347;--scene-button-ink:#3a2a08;
  background:radial-gradient(ellipse at 50% 0,#eaf7ff 0,transparent 60%),linear-gradient(180deg,#bfe4f7,#eaf6ea 70%,#fbf3da);
}
/* Diseño "Aleph": sin escena ilustrada ni fondo oscuro -- blanco y azul
   plano, reusando los tokens base de la app (--text/--muted/--acc/--paper)
   en vez de una paleta propia de este archivo, para que sea el default
   "higiénico" que no compite visualmente con estrellas/caritas. */
#app>.scale-child--plain.screen {
  --scene-ink:var(--text);--scene-muted:var(--muted);--scene-accent:var(--acc);--scene-button-ink:#fff;
  background:var(--paper);
}
.scale-child>* { position:relative;z-index:1;min-width:0; }
.scale-child>.child-sky,.scale-child>.child-balloons { position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none; }
.scale-child__heading { display:flex;align-items:center;justify-content:space-between;gap:20px;padding-right:152px;min-height:36px; }
.scale-child__heading h1 { margin:0;font-size:clamp(15px,1.4vw,19px);font-weight:600;letter-spacing:-.02em;color:var(--scene-muted); }
.scale-child__heading>span { font-size:13px;white-space:nowrap;color:var(--scene-muted); }
.scale-child__stage { align-self:center;width:min(1160px,100%);margin-inline:auto; }
.scale-child .scale-run__save { color:var(--scene-muted);font-size:12px;margin:0; }
.scale-child .b { border-radius:999px;min-height:48px;padding:13px 25px;font-size:15px;font-weight:650;color:var(--scene-ink);border:1px solid color-mix(in srgb,var(--scene-ink) 25%,transparent);background:transparent; }
.scale-child .b:hover { background:color-mix(in srgb,var(--scene-ink) 9%,transparent); }
.scale-child .b--p { color:var(--scene-button-ink);background:var(--scene-accent);border-color:var(--scene-accent);box-shadow:0 5px 22px #070d2620; }
.scale-child .b--p:hover { background:color-mix(in srgb,var(--scene-accent) 88%,white); }
.scale-child .b:disabled { opacity:.35; }
.scale-child .b:focus-visible,.child-park__boy:focus-visible { outline:3px solid var(--scene-accent);outline-offset:5px; }
.scale-child .scale-run__actions { gap:14px;width:min(700px,100%);margin:28px auto 0; }
.child-question { text-align:center;max-width:900px;margin:0 auto 26px; }
.child-question h2 { font-size:clamp(25px,3.3vw,43px);font-weight:600;line-height:1.24;letter-spacing:-.025em;margin:0;color:var(--scene-ink);text-wrap:balance; }
.child-question>p { color:var(--scene-muted);font-size:16px;line-height:1.5; }
.child-question .child-question__hint { font-size:18px;font-weight:600;margin:0 0 13px; }
.child-stars { display:flex;align-items:flex-start;justify-content:center;gap:clamp(5px,1.5vw,23px);padding:24px 0 20px; }
.child-star { position:relative;display:flex;align-items:center;flex-direction:column;width:clamp(48px,14vw,166px);cursor:pointer;touch-action:manipulation;min-width:0;padding:8px 0;border-radius:26px;color:var(--scene-muted); }
.child-star__input { position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;z-index:1;cursor:inherit; }
.child-star__picture { display:block;width:100%;height:auto;filter:drop-shadow(0 7px 6px #0d102d45);overflow:visible;transition:filter .18s ease,transform .18s ease; }
.child-star__body { fill:#665039;stroke:#a88a50;stroke-width:1.6; }
.child-star__shadow { fill:#302a39; }
.child-star__shine { stroke:#b79b62;opacity:.25; }
.child-star.is-lit .child-star__shadow { fill:#8a603d; }
.child-star.is-lit .child-star__shine { stroke:#fff9d5;opacity:.9; }
.child-star.is-lit .child-star__body { fill:#ffda68;stroke:#fff0b0; }
.child-star.is-lit .child-star__picture { filter:drop-shadow(0 0 24px #ffd36480) drop-shadow(0 7px 7px #0d102d35); }
.child-star:has(input:checked) { background:#fff4c30c;box-shadow:0 0 0 1px #ffe5a252; }
.child-star:has(input:focus-visible) { outline:3px solid #ffecb1;outline-offset:5px; }
.child-star:hover .child-star__picture { transform:translateY(-4px); }
.child-star__number { display:grid;place-items:center;width:22px;height:22px;border-radius:50%;font-size:12px;font-weight:600;margin:10px 0 7px;background:#ffffff10;color:#fff0c4; }
.child-star__label { width:100%;word-break:normal;overflow-wrap:normal;text-align:center;font-size:clamp(18px,1.7vw,22px);line-height:1.3;font-weight:650;padding:0;color:#fff4d7; }
.child-star__keep-words { white-space:nowrap; }
.child-balloon-row { display:flex;align-items:flex-start;justify-content:center;gap:clamp(5px,1.8vw,26px);padding:24px 0 20px;flex-wrap:wrap; }
.child-balloon-pick { position:relative;display:flex;align-items:center;flex-direction:column;width:clamp(52px,13vw,140px);cursor:pointer;touch-action:manipulation;min-width:0;padding:8px 0;border-radius:26px;color:var(--scene-muted); }
.child-balloon-pick__input { position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;z-index:1;cursor:inherit; }
.child-balloon__picture { display:block;width:100%;height:auto;filter:drop-shadow(0 7px 6px #0d102d30);overflow:visible;transition:filter .18s ease,transform .18s ease; }
/* Siempre rojo, elegido o no -- solo cambia la saturación/el brillo, nunca
   el tono, a propósito (ver designs.ts: a diferencia de una carita, un
   globo no debe sugerir que un puntaje mayor es "mejor" o "peor"). */
.child-balloon__body { fill:#f0b3ab;stroke:#e08077;stroke-width:1.6; }
.child-balloon__shadow { fill:#8a4038; }
.child-balloon__knot { fill:#f0b3ab; }
.child-balloon__string { stroke:#8a7a63;stroke-width:3;stroke-linecap:round; }
.child-balloon-pick.is-selected .child-balloon__body { fill:#e3261a;stroke:#ff6a52; }
.child-balloon-pick.is-selected .child-balloon__knot { fill:#e3261a; }
.child-balloon-pick.is-selected .child-balloon__picture { filter:drop-shadow(0 0 24px #e3261a70) drop-shadow(0 7px 7px #0d102d30); }
.child-balloon-pick:has(input:checked) { background:#e3261a0c;box-shadow:0 0 0 1px #e3261a40; }
.child-balloon-pick:has(input:focus-visible) { outline:3px solid #ff6a52;outline-offset:5px; }
.child-balloon-pick:hover .child-balloon__picture { transform:translateY(-4px); }
.child-balloon-pick__label { width:100%;word-break:normal;overflow-wrap:normal;text-align:center;font-size:clamp(16px,1.5vw,20px);line-height:1.3;font-weight:650;padding:0;margin-top:10px;color:var(--scene-ink); }
.child-neutral { display:flex;align-items:stretch;justify-content:center;gap:10px;padding:24px 0 20px;flex-wrap:wrap; }
.child-neutral-option { position:relative;display:flex;align-items:center;justify-content:center;min-width:0;cursor:pointer;touch-action:manipulation;padding:13px 22px;border-radius:999px;border:1.5px solid color-mix(in srgb,var(--scene-ink) 22%,transparent);color:var(--scene-ink);font-size:15px;font-weight:600;text-align:center;transition:background .15s ease,border-color .15s ease,color .15s ease; }
.child-neutral-option__input { position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;z-index:1;cursor:inherit; }
.child-neutral-option:hover { background:color-mix(in srgb,var(--scene-ink) 6%,transparent); }
.child-neutral-option.is-selected { color:var(--scene-button-ink);background:var(--scene-accent);border-color:var(--scene-accent);box-shadow:0 4px 14px color-mix(in srgb,var(--scene-accent) 35%,transparent); }
.child-neutral-option:has(input:focus-visible) { outline:3px solid var(--scene-accent);outline-offset:3px; }
.scale-child .scale-run__error { color:var(--scene-accent);font-size:14px;text-align:center;margin:12px 0 0;line-height:1.4; }
.scale-child .scale-run__error:empty { margin:0; }
.scale-child-intro.test-instructions { width:min(940px,100%);max-width:940px;margin:auto;padding:0;box-sizing:border-box;color:var(--scene-ink);background:transparent;border:0;box-shadow:none; }
.scale-child .test-instructions__header { text-align:center;margin:0 0 12px; }
.scale-child .test-instructions__header h2 { color:var(--scene-ink);font-size:clamp(27px,3.6vw,44px);line-height:1.18;margin:0;letter-spacing:-.03em; }
.scale-child .test-instructions__figure { border:0;background:transparent;padding:0;margin:18px 0;box-shadow:none;overflow:visible; }
.scale-child .test-instructions__content { text-align:center;width:min(650px,100%);margin:0 auto; }
.scale-child .test-instructions__content p { font-size:17px;line-height:1.6;color:var(--scene-muted);margin:8px 0; }
.scale-child .test-instructions__action { display:flex;align-items:center;justify-content:center;gap:18px;width:auto;min-width:225px;margin:24px auto 0; }
.child-intro__preview .child-stars { padding:0; }
.child-intro__preview .child-star { width:clamp(46px,10vw,108px);cursor:default; }
.child-intro__preview .child-star__picture { transform:none; }
.child-intro__preview .child-star:has(input:checked) { background:none;box-shadow:none; }
.child-intro__preview .child-star__number { margin:4px 0; }
.child-intro__preview .child-star__label { font-size:17px; }
.child-intro__preview .child-balloon-row { padding:0; }
.child-intro__preview .child-balloon-pick { width:clamp(48px,9vw,96px);cursor:default; }
.child-intro__preview .child-balloon__picture { transform:none; }
.child-intro__preview .child-balloon-pick:has(input:checked) { background:none;box-shadow:none; }
.child-intro__preview .child-balloon-pick__label { font-size:15px;margin-top:4px; }
.child-resume { color:var(--scene-accent);text-align:center;font-size:14px; }
.child-practice-feedback { min-height:24px;text-align:center;font-size:16px;line-height:1.45;color:var(--scene-accent);margin:18px 0 0; }
.scale-child .child-practice-actions { justify-content:center;margin-top:18px; }
.child-park { position:relative;isolation:isolate;height:clamp(190px,42dvh,450px);width:100%;border-radius:30px;background:linear-gradient(#dcebe4 0,#e9f0da 65%);box-shadow:inset 0 0 0 1px #72865a12; }
.child-park__landscape { position:absolute;inset:0;width:100%;height:100%;border-radius:inherit;z-index:-1; }
.child-park__tree { position:absolute;right:4%;bottom:19%;width:clamp(110px,22vw,250px);height:86%; }
.child-park__boy { position:absolute;bottom:20%;width:clamp(60px,11vw,106px);transform:translateX(-50%);cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;border-radius:30px;transition:left .12s ease; }
.child-park__boy svg { display:block;width:100%;height:auto;pointer-events:none; }
.child-park__boy[data-dragging] { cursor:grabbing;transition:none; }
.child-park--demo .child-park__boy { cursor:default; }
.child-park__ends { position:absolute;left:7%;right:9%;bottom:8%;display:flex;justify-content:space-between;color:#3d5630;font-size:13px;font-weight:650; }
.child-park__bench { position:absolute;left:8%;bottom:37%;width:75px;height:30px;opacity:.45; }
.child-park__bench span { display:block;height:10px;border-radius:4px;background:#ae8d61;box-shadow:0 13px #ae8d61; }
.child-park__bench i { position:absolute;left:10px;right:10px;top:8px;bottom:-13px;border-inline:5px solid #76674c; }
.child-park-controls { display:flex;justify-content:center;align-items:center;gap:18px;margin-top:13px; }
.scale-child .child-park-controls .b { display:grid;place-items:center;flex:0 0 44px;box-sizing:border-box;padding:0;width:44px;height:44px;min-height:44px;line-height:1; }
.child-park-controls svg { display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
.child-park-controls p { color:var(--scene-muted);font-size:13px;text-align:center;max-width:30ch;line-height:1.4;margin:0; }
.child-intro__preview .child-park { height:clamp(130px,23dvh,230px);width:min(750px,100%);margin:auto; }
.child-intro__preview .child-park__boy { width:clamp(45px,7vw,65px); }
.child-intro__preview .child-park__tree { width:clamp(90px,17vw,160px); }
.child-intro__preview .child-park__ends { display:none; }
.child-review { grid-template-columns:repeat(5,minmax(0,1fr));width:min(850px,100%);margin:28px auto;gap:12px; }
.scale-child .child-review .b { display:grid;grid-template-columns:auto 1fr;gap:7px 10px;padding:15px 12px;border-radius:18px;background:#fff2d60c;box-shadow:inset 0 0 0 1px #fff2d61a;color:var(--scene-ink); }
.child-review .b>span { grid-row:1/3;background:#fff2d614;color:var(--scene-muted); }
.child-review .b>strong { color:#ffda68;letter-spacing:1px;font-size:16px;white-space:nowrap; }
.child-review .b>small { font-size:11px;font-weight:400;color:var(--scene-muted); }
@media(max-width:700px) {
  #app>.scale-child.screen { padding:16px 16px 12px;gap:10px; }
  .scale-child__heading { display:block;padding-right:136px;min-height:36px; }
  .scale-child__heading h1 { font-size:13px;line-height:1.3; }
  .scale-child__heading>span { display:block;font-size:11px;margin-top:4px; }
  .child-question { margin-bottom:22px; }
  .child-question h2 { font-size:clamp(23px,6vw,29px); }
  .child-stars { gap:5px;padding:20px 0; }
  .child-star,.child-intro__preview .child-star { width:calc((100vw - 60px)/5); }
  .child-star__label { font-size:clamp(14px,4vw,16px); }
  .child-intro__preview .child-star__label { font-size:clamp(14px,4vw,16px); }
  .child-star__number { font-size:11px;width:20px;height:20px; }
  .scale-child .scale-run__actions { margin-top:22px; }
  .scale-child .b { min-height:46px;padding:12px 20px;font-size:14px; }
  .scale-child .test-instructions__content p { font-size:15px;line-height:1.5; }
  .scale-child .test-instructions__header h2 { font-size:29px; }
  .scale-child .test-instructions__figure { margin:16px 0; }
  .scale-child .test-instructions__action { margin-top:20px; }
  .child-park { height:38dvh;min-height:165px; }
  .child-park__tree { right:2%;width:130px; }
  .child-park__boy { width:68px; }
  .child-park__bench { width:48px;height:20px;left:7%; }
  .child-park-controls { gap:12px; }
  .child-park-controls p { max-width:22ch;font-size:12px; }
  .child-practice-feedback { font-size:14px; }
  .child-review { grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:18px auto; }
  .scale-child .child-review .b { min-height:46px;padding:8px 10px;gap:2px 7px; }
  .child-review .b>strong { font-size:14px;letter-spacing:.4px; }
}
@media(max-height:700px) {
  #app>.scale-child.screen { padding-block:10px;gap:7px; }
  .child-question { margin-bottom:14px; }
  .child-question h2 { font-size:clamp(21px,3vw,30px); }
  .child-question .child-question__hint { margin-bottom:8px;font-size:15px; }
  .child-stars { padding:10px 0; }
  .scale-child .scale-run__actions { margin-top:16px; }
  .scale-child .test-instructions__content p { font-size:14px;line-height:1.4;margin:7px 0; }
  .scale-child .test-instructions__header h2 { font-size:27px; }
  .scale-child .test-instructions__figure { margin-block:12px; }
  .scale-child .test-instructions__action { margin-top:15px; }
  .child-park { height:31dvh;min-height:150px; }
  .child-intro__preview .child-park { height:20dvh;min-height:112px; }
  .child-park__boy { width:58px; }
  .child-park-controls { margin-top:8px; }
  .child-practice-feedback { margin-top:12px;font-size:13px;min-height:19px; }
  .scale-child .scale-run__save { font-size:10px; }
  .child-question>p { font-size:13px;margin-block:8px; }
  .child-review { margin-block:14px; }
}
@media(max-height:500px) and (min-width:600px) {
  #app>.scale-child.screen { padding:8px 22px;gap:5px; }
  .scale-child__heading { min-height:24px; }
  .scale-child__heading h1 { font-size:13px; }
  .scale-child__heading>span { font-size:11px; }
  .child-question { margin-bottom:8px; }
  .child-question h2 { font-size:23px; }
  .child-question .child-question__hint { margin:0 0 4px; }
  .child-star { width:86px;padding:0; }
  .child-star__number { margin:3px 0;width:18px;height:18px;font-size:10px; }
  .child-star__label { font-size:16px; }
  .child-stars { padding:5px 0; }
  .scale-child .scale-run__actions { margin-top:10px; }
  .scale-child .b { min-height:42px;padding:10px 20px;font-size:13px; }
  .child-park { height:38dvh;min-height:110px; }
  .child-park__boy { width:48px; }
  .child-park__tree { width:116px; }
  .child-park-controls { position:absolute;left:12px;right:12px;margin:-48px auto 0; }
  .child-park-controls p { background:#edf2dcdb;padding:5px 10px;border-radius:30px;font-size:11px; }
  .child-park-controls .b { background:#edf2dc!important; }
  .child-practice-feedback { min-height:17px;margin-top:7px;font-size:12px; }
  .scale-child-intro { display:grid;grid-template-columns:1fr 1.2fr;column-gap:30px;align-items:center; }
  .scale-child .test-instructions__header { grid-column:1;margin:0 0 6px; }
  .scale-child .test-instructions__header h2 { font-size:26px; }
  .scale-child .test-instructions__content { grid-column:1;grid-row:2; }
  .scale-child .test-instructions__content p { font-size:12px;line-height:1.4;margin:5px 0; }
  .scale-child .test-instructions__figure { grid-column:2;grid-row:1/4;margin:0; }
  .scale-child .test-instructions__action { grid-column:1;min-width:0;margin-top:10px; }
  .child-intro__preview .child-stars { gap:12px; }
  .child-intro__preview .child-star { width:55px; }
  .child-intro__preview .child-star__label { font-size:14px; }
  .child-intro__preview .child-park { height:180px; }
  .child-review { grid-template-columns:repeat(5,minmax(0,1fr));margin:8px auto;gap:8px; }
  .scale-child .child-review .b { padding:8px;gap:4px;min-height:44px; }
}
@media(max-width:360px) {
  #app>.scale-child--sky.screen { padding-inline:10px; }
  .child-stars { gap:7px; }
  .child-star,.child-intro__preview .child-star { width:calc((100vw - 48px)/5); }
  .child-star__label { font-weight:600;letter-spacing:-.04em; }
}
@media(prefers-reduced-motion:reduce) {
  .child-star__picture,.child-park__boy { transition:none; }
}

/* Vista previa del diseño de escala (diálogo de project-create.js, ver
   task-design.js bindDesignPreviews) -- define sus propias variables
   --scene-* en vez de depender de #app>.scale-child--X.screen (esas reglas
   solo aplican dentro de #app, no dentro de un <dialog>), para reusar
   .child-star/.child-balloon-pick/.child-neutral-option intactos sin tocar nada del
   recorrido real de la encuesta. */
.design-preview-scale { --scene-ink:var(--text);--scene-muted:var(--muted);--scene-accent:var(--acc);--scene-button-ink:#fff;padding:26px 20px;border-radius:14px;background:var(--paper); }
.design-preview-scale--sky { --scene-ink:#fff8e9;--scene-muted:#c9cce6;--scene-accent:#ffe292;--scene-button-ink:#382c4b;background:linear-gradient(160deg,#141d3b,#252b50 55%,#38345b); }
.design-preview-scale--balloons { --scene-ink:#1c3b55;--scene-muted:#4f7891;--scene-accent:#ffb347;--scene-button-ink:#3a2a08;background:linear-gradient(180deg,#bfe4f7,#eaf6ea 70%,#fbf3da); }
.design-preview-scale .child-question { text-align:center;margin:0 0 6px; }
.design-preview-scale .child-question h2 { font-size:19px;font-weight:600;color:var(--scene-ink);margin:0; }
