/* Cartel de imprenta en el tablón del taller. Titulares de la familia del juego,
   cartoné y tinta roja; la regla entre los encargos hace de registro de imprenta. */
.con-misiones,.reto-tablero,.reto-hud,#reto-salida {
  --reto-tinta:#272f27; --reto-papel:#f3e9ce; --reto-ocre:#e3b858;
  --reto-rojo:#97391f; --reto-regla:#bcad88;
  --reto-tipo:Georgia,'Times New Roman',serif;
  --reto-mono:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',monospace;
}
header.con-misiones #reto-abrir {
  color:#252e25; background:var(--reto-ocre); border:1px solid #e0c988;
  font-weight:750; margin-inline-start:auto;
}
header.con-misiones #rounds,header.con-misiones #menu {margin-inline-start:0}
#reto-salida {
  border:1px solid #b9a279;background:transparent;color:#f5dba2;
  border-radius:3px;padding:6px 8px;font-weight:650;font-size:12px;
}
#play.riding #reto-salida,#play.planning #reto-salida,#play.con-reto #mission {display:none}
.reto-tablero,.reto-hud {
  color-scheme:light;color:var(--reto-tinta);
  font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue',Arial,sans-serif;
}
dialog.reto-tablero {
  width:min(778px,94vw);max-width:none;max-height:min(88svh,810px);
  margin:auto; padding:0; overflow:auto; overscroll-behavior:contain;
  background:var(--reto-papel);border:2px solid var(--reto-tinta);
  border-bottom:6px solid var(--reto-rojo);border-radius:0;
  box-shadow:4px 4px 0 #182021; scrollbar-color:#a39775 var(--reto-papel);
}
.reto-tablero::backdrop {background:#142120da}
.reto-tablero button,.reto-hud button,.reto-acceso,.reto-acceso-inicio {touch-action:manipulation}
.reto-tablero button:focus-visible,.reto-hud button:focus-visible {outline:3px solid #784018;outline-offset:-3px}
.reto-cabecera {
  padding:18px 22px 14px; display:flex;gap:14px;align-items:flex-start;justify-content:space-between;
  border-bottom:3px solid var(--reto-tinta);
}
.reto-tablero h2 {
  font:italic 750 clamp(30px,4.6vw,48px)/.98 var(--reto-tipo);
  letter-spacing:-.066em; margin:0; color:var(--reto-tinta);
}
#reto-progreso {margin:7px 0 0;font:650 12px/1.25 var(--reto-mono);color:#574f3c}
#reto-cerrar,.reto-volver-lista,.reto-recoger {
  background:transparent;border:1px solid #827c61;color:var(--reto-tinta);
  padding:6px 10px;border-radius:2px;font:650 12px/1.2 var(--reto-mono);
}
#reto-cerrar {min-height:37px}
.reto-dos-columnas {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.96fr)}
.reto-lista,.reto-ficha {min-width:0}
.reto-lista {display:flex;flex-direction:column;border-right:1px solid var(--reto-tinta)}
.reto-lista .reto-fila {
  width:100%;display:grid;text-align:left;align-items:center;grid-template-columns:42px minmax(0,1fr) auto;
  gap:8px;min-height:53px;padding:6px 13px 7px 10px;border:0;border-bottom:1px solid var(--reto-regla);
  border-radius:0;background:transparent;color:var(--reto-tinta);position:relative;
}
.reto-lista .reto-fila:last-child {border-bottom:0}
.reto-fila[aria-pressed=true] {background:#e4cb8e;box-shadow:inset 5px 0 0 var(--reto-rojo)}
.reto-fila:hover {background:#e8dbb8}
.reto-fila[aria-pressed=true]:hover {background:#e4cb8e}
.reto-fila .reto-grabado {width:42px;height:31px;object-fit:contain}
.reto-fila-texto {display:flex;flex-direction:column;gap:2px}
.reto-fila-titulo {font:700 16px/1.1 var(--reto-tipo);letter-spacing:-.025em;overflow-wrap:anywhere}
.reto-fila-lugar {color:#524d3a;font:500 10px/1.22 var(--reto-mono)}
.reto-fila-estado {white-space:nowrap;color:var(--reto-rojo);font:700 10px/1.25 var(--reto-mono)}
.reto-ficha {display:flex;flex-direction:column;padding:16px 22px 18px}
.reto-volver-lista {display:none}
.reto-lamina {
  height:103px;position:relative;background:#e6c46c;border:1px solid #ba9b56;
  display:grid;place-items:center;overflow:hidden;
}
.reto-lamina:before,.reto-lamina:after {
  content:'';position:absolute;left:10px;right:10px;border-top:1px dashed #b29858;
}
.reto-lamina:before {top:7px}.reto-lamina:after{bottom:7px}
.reto-lamina .reto-grabado {width:160px;height:103px;object-fit:contain}
.reto-ficha .reto-destinos {margin:12px 0 5px;color:#67513c;font:650 11px/1.4 var(--reto-mono)}
.reto-ficha h3 {
  font:750 30px/1.02 var(--reto-tipo);margin:0;color:var(--reto-tinta);letter-spacing:-.05em;overflow-wrap:anywhere;
}
.reto-ficha .reto-gancho {font-size:15px;line-height:1.4;margin:9px 0 15px;color:#333a2d}
.reto-ficha-pie {margin-top:auto;border-top:1px solid var(--reto-regla);padding-top:10px;display:grid;gap:8px}
.reto-sello {margin:0!important;display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 8px;}
.reto-sello span {font:600 10px/1.4 var(--reto-mono);color:#5b523b}
.reto-sello strong {font:italic 700 18px/1.2 var(--reto-tipo);color:var(--reto-rojo)}
.reto-sello .reto-marca {width:100%}
.reto-primario,.reto-mando,.reto-secundario {
  display:block;border:1px solid var(--reto-tinta);border-bottom-width:3px;
  min-height:38px;padding:7px 11px;border-radius:2px;
  font:700 14px/1.22 -apple-system,BlinkMacSystemFont,'Helvetica Neue',Arial,sans-serif;
}
.reto-primario {background:var(--reto-tinta);color:var(--reto-papel);border-color:var(--reto-tinta)}
.reto-primario:hover {background:#444c35}
.reto-secundario,.reto-mando {color:var(--reto-tinta);background:#f8efd9;border-color:#9b8d66;border-bottom-color:#746643}
.reto-secundario:hover,.reto-mando:hover {background:#ecd28f}
.reto-secundario:active,.reto-mando:active {background:#dfbd68;transform:translateY(1px)}
.reto-salir-mision {justify-self:start;border:0;background:transparent;text-decoration:underline;color:#78503a;padding:4px 0}
.reto-confirmar {margin:1px 0;font-size:13px}
#play #reto-hud {
  position:absolute;z-index:3;left:clamp(14px,3vw,42px);bottom:45px;
  width:min(355px,calc(100% - 224px));max-height:calc(100% - 155px);overflow:auto;
  background:var(--reto-papel);border:1px solid #514c38;border-left:5px solid var(--reto-ocre);
  box-shadow:2px 3px 0 #1c281f;scrollbar-color:#948867 var(--reto-papel);overscroll-behavior:contain;
}
#reto-hud[hidden],#reto-hud [hidden],#play.planning #reto-hud,#play.clean #reto-hud {display:none}
.reto-borde {display:flex;align-items:center;justify-content:space-between;gap:5px;padding:6px 10px 0}
.reto-etapa {font:650 10px/1.28 var(--reto-mono);color:#6f4c31;overflow-wrap:anywhere}
.reto-recoger {padding:4px 7px;font-size:10px;min-height:27px;flex:none}
.reto-hud-cuerpo {padding:4px 12px 9px}
.reto-hud-titulo {font:700 23px/1.04 var(--reto-tipo);letter-spacing:-.04em;margin:0;color:var(--reto-tinta)}
.reto-hud-cuerpo p {color:#393c2e;margin:5px 0 0;font:500 13px/1.36 -apple-system,BlinkMacSystemFont,'Helvetica Neue',Arial,sans-serif}
.reto-hud-cuerpo .reto-lectura {font:650 12px/1.35 var(--reto-mono);color:#524a32}
.reto-hud-cuerpo .reto-mensaje {color:var(--reto-rojo);font-weight:700}
.reto-hud-cuerpo .reto-bono {padding:4px 0 1px;border-top:1px dashed #bf965d;font-weight:750;color:#794421}
.reto-acciones {display:flex;gap:5px;flex-wrap:wrap;margin:8px 0 2px}
.reto-acciones button {flex:1 1 auto;min-height:35px;font-size:12px}
.reto-instrumento {margin-top:8px;border:1px solid #bcae87;background:#e8ddbd;padding:7px 10px}
.reto-inst-etiqueta {display:block;font:650 10px/1.2 var(--reto-mono);color:#544936;margin-bottom:5px}
.reto-dial {height:23px;position:relative;background:#292e26;padding:5px 6px 2px}
.reto-escala {height:100%;display:flex;justify-content:space-between;align-items:flex-end}
.reto-escala i {width:1px;height:6px;background:#f0d98c}.reto-escala i.larga {height:13px}
.reto-aguja {position:absolute;top:1px;bottom:1px;width:3px;left:clamp(3px,var(--reto-frecuencia),calc(100% - 4px));background:#ff895a}
.reto-extremos {display:flex;justify-content:space-between;font:600 10px/1.2 var(--reto-mono);margin-top:2px}
.reto-rastro {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px}
.reto-rastro span,.reto-piezas span {font:600 11px/1.22 var(--reto-mono);padding:4px 5px;border:1px solid #a59b78;background:#f1e8cf;text-align:center;overflow-wrap:anywhere}
.reto-rastro .actual,.reto-piezas .actual {border:2px solid #853e28;background:#edc97d;padding:3px 4px}
.reto-piezas {display:flex;gap:3px}.reto-piezas>span {flex:1;min-width:0}
.reto-instrumento[data-tipo=prensa] .reto-piezas {counter-reset:pliego;gap:5px}
.reto-instrumento[data-tipo=prensa] .reto-piezas>span {counter-increment:pliego;min-height:32px;text-align:left;font:700 14px/1.17 var(--reto-tipo);padding:4px 5px;border-top:2px solid var(--reto-rojo)}
.reto-instrumento[data-tipo=prensa] .reto-piezas>span:before {content:counter(pliego);display:block;font:600 9px/1 var(--reto-mono);color:var(--reto-rojo);margin-bottom:2px}
.reto-instrumento[data-tipo=alforjas] .reto-piezas>span {border-bottom:4px solid #78634a}
.reto-luces {display:flex;gap:7px;align-items:center;border-top:2px solid var(--reto-tinta)}
.reto-luces span {flex:1;text-align:center;font:650 9px/1.1 var(--reto-mono)}
.reto-luces i {display:block;width:13px;height:13px;margin:4px auto 2px;border-radius:50%;border:1px solid #4e4d39;background:#757461}
.reto-luces .encendida i {background:#ffca56;outline:2px solid #b45834;outline-offset:1px}
#play.reto-recogido .reto-hud-cuerpo {display:none}
@media(max-width:680px) {
  header.con-misiones {padding-inline:8px;gap:4px}
  header.con-misiones .wordmark {font-size:14px}
  header.con-misiones button {padding-inline:7px}
  #play #reto-hud {left:8px;bottom:28px;width:calc(100% - 157px);max-height:calc(100% - 170px)}
  #play.reto-en-parada:not(.reto-recogido) #reto-hud {width:calc(100% - 16px);max-height:55%;bottom:25px}
  #play.reto-en-parada:not(.reto-recogido) .controls {visibility:hidden}
  .reto-borde {padding:4px 7px 0}.reto-hud-cuerpo{padding:4px 8px 7px}
  .reto-hud-titulo {font-size:20px}.reto-hud-cuerpo p{font-size:12px}
  #reto-hud[data-fase=ruta] .reto-hud-titulo {font-size:18px}
  #reto-hud[data-fase=ruta] .reto-etapa {font-size:9px}
  #reto-salida {font-size:11px;padding:5px 6px}
  .reto-acciones button {min-height:38px}
}
@media(max-width:620px) {
  dialog.reto-tablero {width:calc(100vw - 14px);max-height:calc(100svh - 22px);border-width:1px 1px 4px}
  .reto-cabecera {position:sticky;top:0;z-index:1;padding:12px 14px;background:var(--reto-papel);align-items:center}
  .reto-tablero h2 {font-size:31px}
  .reto-dos-columnas {display:block}
  .reto-lista {border-right:0}
  .reto-lista .reto-fila {min-height:49px}
  .reto-ficha {display:none;padding:10px 15px 15px}
  .reto-detalle-movil .reto-ficha {display:flex}
  .reto-detalle-movil .reto-lista {display:none}
  .reto-volver-lista {display:inline-block;align-self:flex-start;margin:0 0 8px;min-height:33px}
  .reto-lamina {height:70px}.reto-lamina .reto-grabado {height:70px;width:114px}
  .reto-ficha .reto-destinos {margin-top:8px}
  .reto-ficha h3 {font-size:27px}
  .reto-ficha .reto-gancho {margin:6px 0 12px}
}
@media(max-width:360px) {
  header.con-misiones {gap:3px;padding-inline:5px}
  header.con-misiones .wordmark {font-size:12px}
  header.con-misiones button {font-size:10px;padding-inline:4px}
  #play #reto-hud {width:calc(100% - 150px)}
  .reto-tablero h2 {font-size:27px}
}
@media(max-height:545px) {
  #play #reto-hud {bottom:19px;max-height:calc(100% - 64px)}
  #play.reto-en-parada:not(.reto-recogido) #reto-hud {max-height:calc(100% - 75px);width:min(390px,calc(100% - 166px))}
  #play.reto-en-parada .controls {visibility:visible}
  dialog.reto-tablero {max-height:calc(100svh - 12px)}
  .reto-cabecera {padding-block:8px}
  .reto-lamina {height:63px}.reto-lamina .reto-grabado {height:63px}
}
.reto-hud-cuerpo .reto-tiempo {
  display:table;margin-top:5px;padding:3px 6px;background:var(--reto-tinta);color:#f7db8d;
  font:750 16px/1.2 var(--reto-mono);font-variant-numeric:tabular-nums;letter-spacing:-.04em;
}

.reto-senal {display:flex;align-items:flex-end;gap:2px}
.reto-senal i {display:block;width:4px;background:#baa984}
.reto-senal .encendida {background:var(--reto-rojo)}
.reto-solo-lector{clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden;white-space:nowrap}

/* V8: encontrar un encargo, leerlo y tocarlo con una mano. */
.reto-cabecera {position:sticky;top:0;z-index:2;background:var(--reto-papel)}
.reto-coleccion {display:flex;align-items:center;gap:12px;padding:10px 22px;border-bottom:1px solid var(--reto-regla)}
.reto-coleccion progress {width:92px;flex:0 0 92px;height:8px;accent-color:var(--reto-rojo)}
.reto-coleccion span {font:600 11px/1.35 var(--reto-mono);color:#564b33}
.reto-explorar {min-width:0;border-right:1px solid var(--reto-tinta)}
.reto-explorar .reto-lista {border-right:0}
.reto-filtros {display:flex;gap:0;border-bottom:1px solid var(--reto-regla)}
.reto-filtros button {flex:1;min-width:0;min-height:44px;padding:8px 4px;background:transparent;border:0;border-bottom:3px solid transparent;color:var(--reto-tinta);font:650 12px/1.25 system-ui,sans-serif}
.reto-filtros [aria-pressed=true] {border-bottom-color:var(--reto-rojo);background:#e8dab4;color:#712b19}
.reto-filtros span {font:600 10px var(--reto-mono);margin-inline-start:3px}
.reto-orden {display:flex;align-items:center;gap:9px;padding:4px 12px;font:600 11px var(--reto-mono)}
.reto-orden select {flex:1;min-width:0;min-height:44px;color:var(--reto-tinta);background:transparent;border:0;border-bottom:1px solid #928464;border-radius:0;font:600 12px system-ui,sans-serif}
.reto-orden select:focus-visible {outline:3px solid #784018;outline-offset:-3px}
.reto-resultados {margin:2px 12px 8px;font:500 10px/1.4 var(--reto-mono);color:#574a34}
.reto-lista .reto-fila {min-height:62px;grid-template-columns:42px minmax(0,1fr);padding-block:9px;gap:3px 8px}
.reto-fila .reto-grabado {grid-row:1/3}
.reto-fila-lugar {font-size:11px;line-height:1.35}
.reto-fila-estado {grid-column:2;font-size:10px}
.reto-vacio {padding:14px;font-size:14px;line-height:1.45}
.reto-vacio p {margin:0 0 12px}
.reto-datos {display:flex;flex-wrap:wrap;gap:10px 20px;margin:0 0 14px;padding:8px 0;border-top:1px dashed var(--reto-regla)}
.reto-datos dt {font:600 10px var(--reto-mono);color:#64563b}
.reto-datos dd {margin:3px 0 0;font:650 13px/1.25 system-ui,sans-serif}
#reto-cerrar,.reto-volver-lista,.reto-recoger,.reto-salir-mision,.reto-primario,.reto-mando,.reto-secundario,.reto-acciones button,#reto-salida {min-height:44px}
.reto-acciones {gap:6px}
.reto-acciones button {font-size:13px;min-width:44px}
.reto-mando[data-accion=pista] {flex-basis:100%;background:#e7d7b1;border-style:dashed;border-bottom-width:1px}
.reto-hud-cuerpo .reto-ayuda {border-left:3px solid #97391f;padding:6px 8px;margin:7px 0;background:#e8d5ac;color:#4c341f;font-weight:650}
.reto-hud-cuerpo .reto-parcial {font:650 12px/1.4 var(--reto-mono);color:#68401f}
.reto-tiempo.cuenta-atras {font-size:23px;min-width:100px;text-align:center}
.reto-pasos {display:flex;gap:3px;list-style:none;padding:0;margin:4px 0 8px}
.reto-pasos li {flex:1;text-align:center;font:650 10px/1.2 var(--reto-mono);border-bottom:3px solid #baab87;padding:3px 0;color:#786c50}
.reto-pasos li.hecha {border-color:#343c2e;color:#343c2e}
.reto-pasos li.hecha:after {content:' · hecha'}
.reto-pasos li.actual {border-color:#97391f;color:#722b18;font-weight:800}
.reto-pasos li.actual:after {content:' · aquí'}
.reto-senal {gap:2px;align-items:center}
.reto-senal-valor {font-size:11px;margin-right:3px}
.reto-posicion {display:block;font-size:10px;color:#722b18}
.reto-luces small {font-size:11px}
.reto-hud-cuerpo p {line-height:1.4}
@media(max-width:620px) {
  .reto-coleccion {padding:9px 14px;gap:9px}
  .reto-coleccion progress {width:64px;flex-basis:64px}
  .reto-explorar {border-right:0}
  .reto-detalle-movil .reto-explorar {display:none}
  .reto-lista .reto-fila {min-height:62px}
  .reto-ficha {padding-top:10px}
  .reto-ficha .reto-gancho {font-size:14px}
  .reto-orden select {font-size:16px}
  .reto-datos {gap:10px 16px}
  .reto-borde {gap:6px}
  .reto-recoger {padding-inline:8px}
  .reto-hud-cuerpo .reto-instruccion,.reto-hud-cuerpo .reto-ayuda {font-size:13px}
  #play.reto-en-parada:not(.reto-recogido) #reto-hud {max-height:65%;}
}
@media(max-width:680px) and (max-height:620px) {
  #play #reto-hud {left:8px;bottom:240px;width:calc(100% - 16px);max-height:calc(100% - 305px)}
  #play #reto-hud[data-fase=ruta] .reto-hud-cuerpo {padding-bottom:6px}
  #play.reto-en-parada:not(.reto-recogido) #reto-hud {bottom:25px;width:calc(100% - 16px);max-height:calc(100% - 75px)}
  #play.reto-en-parada:not(.reto-recogido) .controls {visibility:hidden}
  #play.reto-recogido #reto-hud {max-height:70px}
}
@media(prefers-reduced-motion:reduce) {
  .reto-tablero *, .reto-hud * {scroll-behavior:auto!important;transition:none!important}
}
.reto-reglas {margin-top:5px;padding-top:0;border-top:1px solid var(--reto-regla)}
.reto-reglas summary {min-height:44px;align-content:center;font:650 12px var(--reto-mono);cursor:pointer}
.reto-reglas p {padding-bottom:7px}
/* La ficha no hereda la altura de las diez filas: su botón queda a la vista. */
.reto-dos-columnas {align-items:start}
@media(min-width:621px) and (min-height:700px) {
  .reto-ficha {position:sticky;top:102px}
}

.reto-hud-cuerpo .reto-turno {margin:2px 0 4px;color:#722b18;font:700 13px/1.3 var(--reto-mono)}
.reto-mesa {display:block;width:100%;height:auto;max-height:75px;object-fit:contain;margin:4px 0}
.reto-mando[data-accion="tomar-turno"] {background:var(--reto-tinta);color:var(--reto-papel,#fff6dd)}
@media(max-width:370px) { .reto-filtros button {font-size:11px} }

.reto-cine {display:block;width:100%;height:auto;margin:5px 0 2px;background:#233955}
.reto-mando[data-accion="pedalada"] {flex:1 0 100%;background:#304739;color:#fff5d6;font-weight:750}
.reto-mando[aria-pressed="true"] {background:#e4bf70;border-color:#704d28}
.reto-instrumento[data-tipo="dinamo"] {background:#f2e4bf}
.reto-borde .reto-etapa{flex:1;min-width:0}
.reto-reiniciar{border:1px solid var(--reto-regla);background:transparent;color:var(--reto-tinta);border-radius:3px;padding:5px 7px;font:650 11px/1.15 var(--reto-mono);min-height:44px;cursor:pointer}
.reto-reiniciar[hidden]{display:none}
