/* POLOLABS — Tool Kit: estilos compartidos de las herramientas migradas. Se apoya en los tokens y clases de app.css (.card, .panel, .field, .btn, .banner, .u-list…)
   y en skin-v1.css (acento único, Inter Tight + JetBrains Mono). Sin degradados decorativos. */
.tk-hero { padding: var(--s6) 0 var(--s4); max-width: 760px; }
.tk-hero h1 { font-size: clamp(30px, 6vw, 44px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 700; }
.tk-intro { margin-top: var(--s3); color: var(--muted); font-size: 16px; max-width: 60ch; }
.tk-kicker { font: 400 12px/1 var(--mono, monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 var(--s3); }
.tk-status { margin-bottom: var(--s4); }
.tk-status:empty { display: none; }
.tk-layout { display: grid; gap: var(--s4); grid-template-columns: 1fr; align-items: start; padding-bottom: var(--s7); }
.tk-col { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
@media (min-width: 980px) { .tk-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s5); } .tk-col--result { position: sticky; top: var(--s4); } }

/* referencia */
.tk-ref__drop { cursor: pointer; min-height: 120px; }
.tk-ref__preview { display: grid; gap: var(--s2); }
.tk-ref__preview img { width: 100%; max-height: 260px; object-fit: contain; border-radius: var(--r-input); background: var(--raised); border: 1px solid var(--border); }
.tk-ref__rm { justify-self: start; }
.tk-analyze { margin-top: var(--s3); }
.tk-desc-wrap { margin-top: var(--s3); }
.tk-desc { width: 100%; min-height: 110px; font-size: 14px; line-height: 1.55; }
input.sr-only:focus-visible + .dropzone, .tk-ref input:focus-visible ~ .dropzone { outline: 2px solid var(--focus); }

/* opciones excluyentes */
.tk-choice { border: 0; padding: 0; margin: 0; min-width: 0; }
.tk-choice legend { padding: 0; margin-bottom: var(--s2); }
.tk-choice__grid { display: grid; gap: var(--s2); grid-template-columns: repeat(2, 1fr); }
.tk-choice--4 .tk-choice__grid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .tk-choice--4 .tk-choice__grid { grid-template-columns: repeat(4, 1fr); } }
.tk-choice input { position: absolute; opacity: 0; pointer-events: none; }
.tk-choice label { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 44px; padding: var(--s2) var(--s3); border: 1px solid var(--field-border); border-radius: var(--r-input); background: var(--raised); cursor: pointer; text-align: center; }
.tk-choice label:hover { border-color: var(--text); }
.tk-choice input:checked + label { background: var(--grad); border-color: transparent; color: var(--on-accent); }
.tk-choice input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.tk-choice__t { font-weight: 650; font-size: 14px; }
.tk-choice__s { font-size: 12px; opacity: .85; }

/* deslizadores */
.tk-range { margin-bottom: var(--s4); }
.tk-range__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.tk-range__val { font: 400 13px/1 var(--mono, monospace); color: var(--accent-text); }
.tk-range input[type=range] { width: 100%; margin: var(--s2) 0 0; accent-color: var(--grad); min-height: 28px; }
.tk-chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tk-chip { cursor: pointer; min-height: 36px; padding: 0 var(--s3); font-size: 13px; }
.tk-chip:hover { border-color: var(--text); }
.tk-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tk-quick-l { margin: var(--s3) 0 var(--s2); }

/* cámara (esfera + deslizadores) */
.tk-cam__grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 560px) { .tk-cam__grid { grid-template-columns: 240px 1fr; } }
.tk-orb-wrap { text-align: center; }
.tk-orb { width: 100%; max-width: 240px; aspect-ratio: 1; touch-action: none; cursor: grab; display: block; margin: var(--s2) auto 0; border-radius: 50%; }
.tk-orb:active { cursor: grabbing; }
.tk-orb:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.tk-orb__terms { margin-top: var(--s3); font: 400 13px/1.4 var(--mono, monospace); color: var(--accent-text); }
.tk-orb__zoom { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* generar y resultado */
.tk-gen { display: grid; gap: var(--s2); }
.tk-gen button[aria-disabled="true"] { opacity: .55; }
.tk-gen-note { min-height: 1.2em; }
.tk-result .prompt-text { resize: vertical; }
.tk-copied { align-self: center; font-size: 13px; color: var(--ok); }
.tk-details { margin-top: var(--s4); }
.tk-details summary { cursor: pointer; font: 400 12px/1 var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: var(--s2) 0; }
.tk-rows { margin-top: var(--s2); }
.tk-st { display: inline-flex; gap: 6px; align-items: baseline; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tk-state.ok { color: var(--ok); font-weight: 700; } .tk-state.warn { color: var(--warn); font-weight: 700; }
.tk-note { margin-top: var(--s2); }
.tk-empty { min-height: 160px; }
@media (prefers-reduced-motion: reduce) { .tk-chip, .tk-choice label { transition: none; } }

/* portada de la herramienta: texto a la izquierda, fotografia a la derecha (escritorio); texto y fotografia apilados (movil).
   Proporcion fija para que no haya saltos de maquetacion; object-position por herramienta y viewport (rostros dentro del recorte). */
.tk-hero--cover { max-width: none; display: grid; gap: var(--s4); grid-template-columns: 1fr; align-items: center; }
.tk-hero--cover .tk-hero__text { max-width: 60ch; }
.tk-cover { margin: 0; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--border); background: var(--raised); aspect-ratio: 16 / 9; }
.tk-cover__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos-m, 50% 50%); }
@media (min-width: 900px) {
  .tk-hero--cover { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: var(--s6); padding-bottom: var(--s5); }
  .tk-cover { aspect-ratio: 4 / 3; }
  .tk-cover__img { object-position: var(--pos-d, 50% 50%); }
}

/* selector de presets / elementos guardados */
.tk-choice--3 .tk-choice__grid { grid-template-columns: repeat(3, 1fr); }
.tk-picklist { display: flex; flex-direction: column; gap: var(--s2); max-height: 340px; overflow-y: auto; margin: var(--s2) 0; }
.tk-pick { display: flex; gap: var(--s2); align-items: stretch; }
.tk-pick__main { flex: 1; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: var(--s2) var(--s3); background: var(--raised); border: 1px solid var(--field-border); border-radius: var(--r-input); min-height: 44px; }
.tk-pick__main span { font-size: 12px; color: var(--muted); }
.tk-pick__main:hover, .tk-pick__main[aria-pressed="true"] { border-color: var(--accent-text); }
.tk-pick__cat { font: 400 12px/1 var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: var(--s3) 0 0; }
.tk-pick__del { min-height: 44px; }
#toolRoot input[type=text] { width: 100%; }
.tk-ref__url { margin-top: var(--s3); }
.tk-gen .btn { width: 100%; }
